@Test
public void getIndexByIdentifierTest() {

    List<FactMapping> originalFactMappings = IntStream.range(0, 2).boxed()
            .map(i -> scesimModelDescriptor
                    .addFactMapping(FactIdentifier.create("test " + i, String.class.getCanonicalName()), this.expressionIdentifier)
            ).collect(Collectors.toList());
    int indexToCheck = 0;
    int indexRetrieved = scesimModelDescriptor.getIndexByIdentifier(originalFactMappings.get(indexToCheck).getFactIdentifier(), this.expressionIdentifier);
    assertEquals(indexToCheck, indexRetrieved);
    indexToCheck = 1;
    indexRetrieved = scesimModelDescriptor.getIndexByIdentifier(originalFactMappings.get(indexToCheck).getFactIdentifier(), this.expressionIdentifier);
    assertEquals(indexToCheck, indexRetrieved);
}