@Test
public void moveFactMappingTest() {

    ExpressionIdentifier expressionIdentifier2 = ExpressionIdentifier.create("Test expression 2", FactMappingType.GIVEN);
    ExpressionIdentifier expressionIdentifier3 = ExpressionIdentifier.create("Test expression 3", FactMappingType.GIVEN);
    FactMapping factMapping1 = scesimModelDescriptor.addFactMapping(factIdentifier, expressionIdentifier);
    FactMapping factMapping2 = scesimModelDescriptor.addFactMapping(factIdentifier, expressionIdentifier2);
    FactMapping factMapping3 = scesimModelDescriptor.addFactMapping(factIdentifier, expressionIdentifier3);
    List<FactMapping> factMappings = scesimModelDescriptor.getUnmodifiableFactMappings();
    assertEquals(factMappings.get(0), factMapping1);
    assertEquals(factMappings.get(1), factMapping2);
    assertEquals(factMappings.get(2), factMapping3);
    scesimModelDescriptor.moveFactMapping(0, 1);
    factMappings = scesimModelDescriptor.getUnmodifiableFactMappings();
    assertEquals(factMappings.get(0), factMapping2);
    assertEquals(factMappings.get(1), factMapping1);
    assertEquals(factMappings.get(2), factMapping3);
    scesimModelDescriptor.moveFactMapping(2, 1);
    factMappings = scesimModelDescriptor.getUnmodifiableFactMappings();
    assertEquals(factMappings.get(0), factMapping2);
    assertEquals(factMappings.get(1), factMapping3);
    assertEquals(factMappings.get(2), factMapping1);
    scesimModelDescriptor.moveFactMapping(2, 2);
    factMappings = scesimModelDescriptor.getUnmodifiableFactMappings();
    assertEquals(factMappings.get(0), factMapping2);
    assertEquals(factMappings.get(1), factMapping3);
    assertEquals(factMappings.get(2), factMapping1);
}