public void addForwardedField(int sourceField, int targetField) {
        if (isTargetFieldPresent(targetField)) {
            throw new InvalidSemanticAnnotationException(
                    "Target field " + targetField + " was added twice.");
        }

        FieldSet targetFields = fieldMapping.get(sourceField);
        if (targetFields != null) {
            fieldMapping.put(sourceField, targetFields.addField(targetField));
        } else {
            fieldMapping.put(sourceField, new FieldSet(targetField));
        }
    }
@Test
    void testAddForwardedFieldsTargetTwice() {
        assertThatThrownBy(
                        () -> {
                            SingleInputSemanticProperties sp = new SingleInputSemanticProperties();
                            sp.addForwardedField(0, 2);
                            sp.addForwardedField(1, 2);
                        })
                .isInstanceOf(InvalidSemanticAnnotationException.class);
    }