import java.util.Collections;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
+import junit.extensions.PA;
+
public class SequenceOntologyTest
{
roots = so.getRootParents("alanine");
assertEquals(roots.size(), 1);
assertEquals(roots.get(0), "sequence_feature");
+
+ /*
+ * verify these are now cached
+ */
+ Map<String, List<String>> cached = (Map<String, List<String>>) PA
+ .getValue(so, "rootParents");
+ List<String> parents = cached.get("stop_gained");
+ assertEquals(parents.size(), 1);
+ parents = cached.get("sequence_variant");
+ assertEquals(parents.size(), 1);
+ assertTrue(parents.contains("sequence_variant"));
+ parents = cached.get("alanine");
+ assertEquals(parents.size(), 1);
+ assertTrue(parents.contains("sequence_feature"));
}
}