public void testGetTermIdNameMap() throws Exception { String test = IOUtils.toString(getClass().getClassLoader().getResourceAsStream("OboParserTest.obo")); Map idNames = parser.getTermIdNameMap(new StringReader(test)); HashMap expecting = new HashMap(); expecting.put("GO:0000001", "mitochondrion inheritance"); expecting.put("GO:0000002", "mitochondrial genome maintenance"); expecting.put("GO:0000003", "reproduction"); expecting.put("GO:0000004", "partoftest"); assertEquals(expecting, idNames); }