### Question:
BinaryRelayBuilder implements Builder { public static byte[] readAllFromInputSteam(InputStream in) throws IOException{ ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; int read = in.read(buf); while(read != -1){ out.write(buf,0,read); read = in.read(buf); } return out.toByteArray(); }  static byte[] readAllFromInputSteam(InputStream in); OMElement processDocument(InputStream inputStream,
			String contentType, MessageContext messageContext);  }### Answer:
@Test public void testRead() throws IOException { InputStream in = new ByteArrayInputStream( "testString".getBytes()); byte[] result = BinaryRelayBuilder.readAllFromInputSteam(in); Assert.assertNotNull("Couldn't read from the input stream!", result); }