Hi! I am a newbie in on TDD. I'm trying to understand how to perform test on a mock object (I'm using Easymock).
For example, i need to test a validate() method of my class InputFile: this should return true if one or more elements are presents in the List InputFile.documents.
I tried with:

geminiMockFile = control.createMock(InputFile1.class);
EasyMock.expect(geminiMockFile.getDocuments().size ()).andReturn(2);
control.replay();
assertTrue(geminiMockFile.validate());


but this gives a nullpointerexception.

Why this doesn't works? Have I to create also a mock list of documents and fill its?
What's wrong?