GuvnorFileService service = createService("http://www.redhat.com", "user", "pass");
HttpClient client = EasyMock.createMock(HttpClient.class);
Map<String, Integer> statuses = new HashMap<String, Integer>();
statuses.put("GET http://www.redhat.com/rest/packages/somePackage/assets/fileName-upfile", 404);
EasyMock.expect(client.executeMethod(EasyMock.isA(MockGetMethod.class))).
andAnswer(new MockAnswer(statuses)).once();
EasyMock.expect(client.executeMethod(EasyMock.isA(MockPostMethod.class))).andReturn(201).once();
service.getHelper().setClient(client);
EasyMock.replay(client);
String url = service.storeFile("somePackage", "fileName.txt", new byte[] { 1,2,3,4,5,6,7,8,9 } );