public void testDeleteFileServiceProblem() throws Exception {
RESTFileService restService = new RESTFileService();
List<Object> requestMocks = createRequestMocks();
FileService fileService = EasyMock.createMock(FileService.class);
FileException exception = new FileException("Something went wrong", new NullPointerException());
fileService.deleteFile(EasyMock.same("somePackage"), EasyMock.same("myFile.tmp"));
EasyMock.expectLastCall().andThrow(exception).once();
requestMocks.add(fileService);
restService.setFileService(fileService);
Object[] mocks = requestMocks.toArray();
EasyMock.replay(mocks);