ScesimModelDescriptor { public List<FactMapping> getFactMappingsByFactName(String factName) { return internalFilter(e -> e.getFactIdentifier().getName().equalsIgnoreCase(factName)); }  List<FactMapping> getUnmodifiableFactMappings(); Set<FactIdentifier> getFactIdentifiers(); List<FactMapping> getFactMappings(); void moveFactMapping(int oldIndex, int newIndex); FactMapping getFactMappingByIndex(int index); int getIndexByIdentifier(FactIdentifier factIdentifier, ExpressionIdentifier expressionIdentifier); List<FactMapping> getFactMappingsByFactName(String factName); Optional<FactMapping> getFactMapping(FactIdentifier factIdentifier, ExpressionIdentifier ei); FactMapping addFactMapping(int index, FactMapping toClone); FactMapping addFactMapping(FactIdentifier factIdentifier, ExpressionIdentifier expressionIdentifier); FactMapping addFactMapping(String factAlias, FactIdentifier factIdentifier, ExpressionIdentifier expressionIdentifier); FactMapping addFactMapping(int index, FactIdentifier factIdentifier, ExpressionIdentifier expressionIdentifier); FactMapping addFactMapping(int index, String factAlias, FactIdentifier factIdentifier, ExpressionIdentifier expressionIdentifier); void clear();  }
@Test public void getFactMappingsByFactName() { IntStream.range(0, 2).forEach(i -> scesimModelDescriptor .addFactMapping(FactIdentifier.create("test", String.class.getCanonicalName()), ExpressionIdentifier.create("test expression " + i, FactMappingType.EXPECT))); scesimModelDescriptor .addFactMapping(FactIdentifier.create("TEST", String.class.getCanonicalName()), ExpressionIdentifier.create("test expression 2", FactMappingType.EXPECT)); scesimModelDescriptor .addFactMapping(FactIdentifier.create("Test", String.class.getCanonicalName()), ExpressionIdentifier.create("test expression 3", FactMappingType.EXPECT)); scesimModelDescriptor .addFactMapping(FactIdentifier.create("tEsT", String.class.getCanonicalName()), ExpressionIdentifier.create("test expression 4", FactMappingType.EXPECT)); final List<FactMapping> retrieved = scesimModelDescriptor.getFactMappingsByFactName("test"); assertNotNull(retrieved); assertEquals(5, retrieved.size()); }