@Test(expectedExceptions = DescriptorValidationFailedException.class)
public void testGetTemplateGeneratorShouldThrowExceptionWhenExternalClassCanNotLoad() {

    //GIVEN
    given(stubResourcePathProvider.getTemplatesPathAsString()).willReturn(CLASS);
    given(externalInitializer.loadExternalClass(CLASS, CLASS, TemplateGenerator.class)).willThrow(
            new DescriptorValidationFailedException(CLASS));
    //WHEN
    underTest.getTemplateGenerator(CLASS);
    //THEN
}