@Test
public void throwsIllegalArgumentExceptionIfTemplatesWithTheSameNameAlreadyRegistered() {

    xsltTemplatesContextResolver.addTemplates("templates 1", mock(Templates.class));
    thrown.expect(IllegalArgumentException.class);
    xsltTemplatesContextResolver.addTemplates("templates 1", mock(Templates.class));
}