### Question:
XMLTransformerFactory { @Nullable public static Templates newTemplates (@Nonnull final IReadableResource aResource) { return newTemplates (s_aDefaultFactory, aResource); } private  XMLTransformerFactory(); @Nonnull static TransformerFactory createTransformerFactory(@Nullable final ErrorListener aErrorListener,
                                                             @Nullable final URIResolver aURIResolver); static void makeTransformerFactorySecure(@Nonnull final TransformerFactory aFactory,
                                                   @Nullable final String... aAllowedExternalSchemes); @Nonnull static TransformerFactory getDefaultTransformerFactory(); @Nullable static Transformer newTransformer(); @Nullable static Transformer newTransformer(@Nonnull final TransformerFactory aTransformerFactory); @Nullable static Transformer newTransformer(@Nonnull final IReadableResource aResource); @Nullable static Transformer newTransformer(@Nonnull final TransformerFactory aTransformerFactory,
                                            @Nonnull final IReadableResource aResource); @Nullable static Transformer newTransformer(@Nonnull final Source aSource); @Nullable static Transformer newTransformer(@Nonnull final TransformerFactory aTransformerFactory, @Nonnull final Source aSource); @Nullable static Templates newTemplates(@Nonnull final IReadableResource aResource); @Nullable static Templates newTemplates(@Nonnull final Source aSource); @Nullable static Templates newTemplates(@Nonnull final TransformerFactory aFactory, @Nonnull final IReadableResource aResource); @Nullable static Templates newTemplates(@Nonnull final TransformerFactory aTransformerFactory, @Nonnull final Source aSource);  }### Answer:
@Test public void testNewTemplates () { Templates t1 = XMLTransformerFactory.newTemplates (new ClassPathResource ("xml/test1.xslt")); assertNotNull (t1); t1 = XMLTransformerFactory.newTemplates (new ClassPathResource ("xml/test2.xslt")); assertNotNull (t1); t1 = XMLTransformerFactory.newTemplates (TransformSourceFactory.create (new ClassPathResource ("xml/test2.xslt"))); assertNotNull (t1); assertNull (XMLTransformerFactory.newTemplates (new ClassPathResource ("test1.txt"))); assertNull (XMLTransformerFactory.newTemplates (TransformSourceFactory.create (new ClassPathResource ("test1.txt")))); try { XMLTransformerFactory.newTemplates ((IReadableResource) null); fail (); } catch (final NullPointerException ex) {} try { XMLTransformerFactory.newTemplates ((Source) null); fail (); } catch (final NullPointerException ex) {} try { XMLTransformerFactory.newTemplates (null, (IReadableResource) null); fail (); } catch (final NullPointerException ex) {} try { XMLTransformerFactory.newTemplates (null, (Source) null); fail (); } catch (final NullPointerException ex) {} }