MediaType.APPLICATION_OCTET_STREAM_TYPE,
new MetadataMap<String, Object>(),
new ByteArrayInputStream("hi".getBytes()));
assertTrue(Arrays.equals(new String("hi").getBytes(), bytes));
InputStream is = (InputStream)p.readFrom(InputStream.class, InputStream.class, new Annotation[]{},
MediaType.APPLICATION_OCTET_STREAM_TYPE,
new MetadataMap<String, Object>(),
new ByteArrayInputStream("hi".getBytes()));
bytes = IOUtils.readBytesFromStream(is);
assertTrue(Arrays.equals(new String("hi").getBytes(), bytes));