### Question:
XsdReader { public static final XmlSchema readSchema(final String fileName, final URIResolver schemaResolver) throws FileNotFoundException { final InputStream istream = new BufferedInputStream(new FileInputStream(fileName)); try { return readSchema(istream, schemaResolver); } finally { closeQuiet(istream); } }  static final XmlSchema readSchema(final String fileName, final URIResolver schemaResolver); static final XmlSchema readSchema(final File file, final URIResolver schemaResolver);  }### Answer:
@Test public void testReadSchemaUsingFile() throws FileNotFoundException, URISyntaxException { final URIResolver mockResolver = mock(URIResolver.class); final File testXSD = new File(getClass().getResource("/test.xsd").toURI()); final XmlSchema schema = XsdReader.readSchema(testXSD, mockResolver); testReadSchema(schema); }
@Test public void testReadSchemaUsingString() throws URISyntaxException, FileNotFoundException { final URIResolver mockResolver = mock(URIResolver.class); final String testXSD = new File(getClass().getResource("/test.xsd").toURI()).getAbsolutePath(); final XmlSchema schema = XsdReader.readSchema(testXSD, mockResolver); testReadSchema(schema); }