getClass().getResourceAsStream("/org/apache/cxf/systest/jaxrs/resources/java.jpg");
Map<String, Object> objects = new LinkedHashMap<String, Object>();
objects.put(MediaType.APPLICATION_XML, jaxb);
objects.put(MediaType.APPLICATION_JSON, json);
objects.put(MediaType.APPLICATION_OCTET_STREAM, is1);
Collection<? extends Attachment> coll = client.postAndGetCollection(objects, Attachment.class);
List<Attachment> result = new ArrayList<Attachment>(coll);
Book jaxb2 = readBookFromInputStream(result.get(0).getDataHandler().getInputStream());
assertEquals("jaxb", jaxb2.getName());
assertEquals(1L, jaxb2.getId());
Book json2 = readJSONBookFromInputStream(result.get(1).getDataHandler().getInputStream());