@Test public void testCopyFrom() throws IOException { ResultInfo result = ResultInfo.create(new ByteArrayOutputStream()); result.setLocation("location"); result.getHeaders().put("a", "b"); result.getHeaders().put("c", "d"); MyResultInfo info = new MyResultInfo(); info.copyFrom(result); Assert.assertEquals(result.getHeaders(), info.getHeaders()); Assert.assertEquals(result.getLocation(), info.getLocation()); }
public void copyFrom(ResultInfo info) { headers.putAll(info.getHeaders()); location = info.getLocation(); }
MyResultInfo { public void copyFrom(ResultInfo info) { headers.putAll(info.getHeaders()); location = info.getLocation(); } }
MyResultInfo { public void copyFrom(ResultInfo info) { headers.putAll(info.getHeaders()); location = info.getLocation(); } MyResultInfo();  MyResultInfo(IndicatingOutputStream ios); }
MyResultInfo { public void copyFrom(ResultInfo info) { headers.putAll(info.getHeaders()); location = info.getLocation(); } MyResultInfo();  MyResultInfo(IndicatingOutputStream ios); OutputStream getOutputStream(); String getBodyAsString(); InputStream getBodyAsStream(); void copyFrom(ResultInfo info); String getLocation(); Map<String, String> getHeaders(); }
MyResultInfo { public void copyFrom(ResultInfo info) { headers.putAll(info.getHeaders()); location = info.getLocation(); } MyResultInfo();  MyResultInfo(IndicatingOutputStream ios); OutputStream getOutputStream(); String getBodyAsString(); InputStream getBodyAsStream(); void copyFrom(ResultInfo info); String getLocation(); Map<String, String> getHeaders();  }