FormatFactory { public List<IChemFormatMatcher> getFormats() { return formats; } FormatFactory();  FormatFactory(int headerLength); void registerFormat(IChemFormatMatcher format); List<IChemFormatMatcher> getFormats(); IChemFormat guessFormat(Reader input); IChemFormat guessFormat(InputStream input);  }
@Test public void testGetFormats() { List<IChemFormatMatcher> formats = factory.getFormats(); Assert.assertNotNull(formats); Assert.assertNotSame(0, formats.size()); for (IChemFormatMatcher matcher : formats) { Assert.assertNotNull(matcher); } }