### Question:
URIToSchemaSourceTransformer implements
        Transformer<URI, SchemaSource> { @Override public SchemaSource transform(final URI uri) throws TransformationException { if (uri == null) { throw new IllegalArgumentException("URI must not be null."); } try { return new SchemaSource(uri.toURL().openStream(), uri.toString()); } catch (final Throwable cause) { throw new TransformationException(cause); } }  @Override SchemaSource transform(final URI uri);  }### Answer:
@Test(expectedExceptions=IllegalArgumentException.class) public void testTransformIfNullPath() throws Exception { transformer.transform(null); }
@Test(expectedExceptions=TransformationException.class) public void testTransformIfIncorrectPath() throws Exception { transformer.transform(new URI("/incorrect/path")); }
@Test public void testTransform() throws Exception { final URI uri = getClass().getResource("/mockSchema.xsd").toURI(); final SchemaSource source = transformer.transform(uri); assertNotNull("Returned schema source is null.", source); assertEquals("Unexpected schema source.", uri.toString(), source.toString()); }