public void moveFactMapping(int oldIndex, int newIndex) {
        if (oldIndex < 0 || oldIndex >= factMappings.size()) {
            throw new IndexOutOfBoundsException(new StringBuilder().append("Index ").append(oldIndex)
                                                        .append(" not found in the list").toString());
        }
        if (newIndex < 0 || newIndex >= factMappings.size()) {
            throw new IndexOutOfBoundsException(new StringBuilder().append("Index ").append(newIndex)
                                                        .append(" out of range").toString());
        }
        FactMapping factMapping = factMappings.get(oldIndex);
        factMappings.remove(oldIndex);
        factMappings.add(newIndex, factMapping);
    }
@Test
    public void moveFactMappingTest() {
        ExpressionIdentifier expressionIdentifier2 = ExpressionIdentifier.create("Test expression 2", GIVEN);
        ExpressionIdentifier expressionIdentifier3 = ExpressionIdentifier.create("Test expression 3", GIVEN);
        FactMapping factMapping1 = modelDescriptor.addFactMapping(factIdentifier, expressionIdentifier);
        FactMapping factMapping2 = modelDescriptor.addFactMapping(factIdentifier, expressionIdentifier2);
        FactMapping factMapping3 = modelDescriptor.addFactMapping(factIdentifier, expressionIdentifier3);

        assertThat(modelDescriptor.getUnmodifiableFactMappings()).containsExactly(factMapping1, factMapping2, factMapping3);

        modelDescriptor.moveFactMapping(0, 1);

        assertThat(modelDescriptor.getUnmodifiableFactMappings()).containsExactly(factMapping2, factMapping1, factMapping3);
    }