@Test
public void testGuessFormat() throws Exception {

    String filename = "data/xyz/bf3.xyz";
    InputStream input = this.getClass().getClassLoader().getResourceAsStream(filename);
    input = new BufferedInputStream(input);
    IChemFormat format = factory.guessFormat(input);
    Assert.assertNotNull(format);
    // make sure the InputStream is properly reset
    BufferedReader reader = new BufferedReader(new InputStreamReader(input));
    String line = reader.readLine();
    Assert.assertNotNull(line);
    Assert.assertEquals("4", line);
    line = reader.readLine();
    Assert.assertNotNull(line);
    Assert.assertEquals("Bortrifluorid", line);
}