public void testGetFileOK() throws Exception {
RESTFileService restService = new RESTFileService();
List<Object> requestMocks = createRequestMocks();
FileService fileService = EasyMock.createMock(FileService.class);
byte[] myContent = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9};
EasyMock.expect(fileService.loadFile(EasyMock.same("somePackage"), EasyMock.same("myFile.tmp"))).
andReturn(myContent);
requestMocks.add(fileService);
restService.setFileService(fileService);
Object[] mocks = requestMocks.toArray();
EasyMock.replay(mocks);