public void testSaveFileServiceProblem() throws Exception {
byte[] bstream = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9};
String fileName = "fileName";
RESTFileService restService = createSaveFileMockService(bstream, fileName, null, true);
FileService fileService = EasyMock.createMock(FileService.class);
FileException exception = new FileException();
EasyMock.expect(fileService.storeFile(EasyMock.eq("somePackage"), EasyMock.eq("fileName"), EasyMock.same(bstream))).
andThrow(exception).once();
restService.setFileService(fileService);
HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class);
HttpSession session = EasyMock.createMock(HttpSession.class);