DummyReader implements ProfileVersionReader { public void setStream(final InputStream is) { this.getDocument(is); }  void setStream(final InputStream is); String getCollectionName(); String getObjectsCount(); String getCollectionSize(); String getObjectsMaxSize(); String getObjectsMinSize(); String getObjectsAvgSize(); Map<String, String> getDistribution(final String name);  }
@Test(expected = FileNotFoundException.class) public void shouldTestMissingDocument() throws Exception { this.reader = new DummyReader(); this.reader.setStream(new FileInputStream(new File("src/test/resources/missing.xml"))); Assert.fail("This code should not have been reached"); }