RarReader implements VolumeManager { @Override public String toString() { return this.getClass().getSimpleName() + "(" + reader + ")"; } RarReader(WindowReader reader); @Override Volume nextArchive(Archive archive, Volume lastVolume); @Override String toString();  }
@Test public void testToString() throws Exception { assertTrue(rar.toString().contains(rar.getClass().getSimpleName())); assertTrue(rar.toString().contains(reader.toString())); }