### Question:
XsdSelector { public Resource provideXsdResource(IngestionFileEntry xmlFile) { Resource xsdResource = xsdList.get(xmlFile.getFileType().getName()); return xsdResource; }  Resource provideXsdResource(IngestionFileEntry xmlFile); Map<String, Resource> getXsdList(); void setXsdList(Map<String, Resource> xsdList);  }### Answer:
@Test public void testValidXmlFile() { final String xmlFileName = "SLI-InterchangeSchool.xml"; final String parentDir = "dummylz"; final String checksum = "e1e10"; final String expectedXsdResource = "SLI-Interchange-EducationOrganization.xsd"; IngestionFileEntry xmlFile = new IngestionFileEntry(parentDir, FileFormat.EDFI_XML, FileType.XML_EDUCATION_ORGANIZATION, xmlFileName, checksum); Resource xsdResource = xsdSelector.provideXsdResource(xmlFile); assertEquals("XSD resource mismatch", expectedXsdResource, xsdResource.getFilename()); }
@Test public void testInvalidXmlFile() { final String xmlFileName = "SLI-InterchangeSchool.xml"; final String parentDir = "dummylz"; final String checksum = "e1e10"; IngestionFileEntry xmlFile = new IngestionFileEntry(parentDir, FileFormat.EDFI_XML, FileType.CONTROL, xmlFileName, checksum); Resource xsdResource = xsdSelector.provideXsdResource(xmlFile); assertNull("XSD resource should be null", xsdResource); }