@Test
public void addUtilityThatAlreadyHasParentTest() {

    TransformationTemplate transformationTemplate = getNewTestTransformationTemplate();
    TransformationUtility transformationUtility = getNewTestTransformationUtility();
    assertEquals(transformationTemplate.add(transformationUtility), "NO_EXTENSION:AnonymousTransformationTemplate-1-AnonymousTransformationUtility");
    try {
        transformationTemplate.add(transformationUtility);
        fail("TransformationDefinitionException was supposed to be thrown");
    } catch (TransformationDefinitionException ex) {
        assertEquals("Invalid attempt to add already registered transformation utility NO_EXTENSION:AnonymousTransformationTemplate-1-AnonymousTransformationUtility to transformation template NO_EXTENSION:AnonymousTransformationTemplate", ex.getMessage());
    }
}