@Test public void testGetBodyAsString() throws IOException { MyResultInfo info = new MyResultInfo(); ResultInfo result = ResultInfo.create(info.getOutputStream()); result.getBodyStream().write("foo".getBytes()); Assert.assertEquals("foo", info.getBodyAsString()); }
public String getBodyAsString() { return new String(copy.toByteArray()); }
MyResultInfo { public String getBodyAsString() { return new String(copy.toByteArray()); } }
MyResultInfo { public String getBodyAsString() { return new String(copy.toByteArray()); } MyResultInfo();  MyResultInfo(IndicatingOutputStream ios); }
MyResultInfo { public String getBodyAsString() { return new String(copy.toByteArray()); } MyResultInfo();  MyResultInfo(IndicatingOutputStream ios); OutputStream getOutputStream(); String getBodyAsString(); InputStream getBodyAsStream(); void copyFrom(ResultInfo info); String getLocation(); Map<String, String> getHeaders(); }
MyResultInfo { public String getBodyAsString() { return new String(copy.toByteArray()); } MyResultInfo();  MyResultInfo(IndicatingOutputStream ios); OutputStream getOutputStream(); String getBodyAsString(); InputStream getBodyAsStream(); void copyFrom(ResultInfo info); String getLocation(); Map<String, String> getHeaders();  }