### Question:
ResourceLocator { public <R> R get(ST_Loc loc, Function<Element, R> mapper) throws FileNotFoundException, DocumentException { return get(loc.getLoc(), mapper); } private  ResourceLocator();  ResourceLocator(OFDDir ofdDir);  ResourceLocator(VirtualContainer vc); ResourceLocator save(); ResourceLocator restore(); String toAbsolutePath(ST_Loc path); String toAbsolutePath(String path); ResourceLocator restWd(); ResourceLocator cd(VirtualContainer vc); ResourceLocator cd(String path); ResourceLocator cd(LinkedList<String> workDir, String path); boolean exist(LinkedList<String> workDir); boolean dirExit(LinkedList<String> workDir); String pwd(); String pwd(List<String> workDir); ST_Loc getAbsTo(ST_Loc to); R get(ST_Loc loc, Function<Element, R> mapper); R get(String loc, Function<Element, R> mapper); Path getFile(ST_Loc stLoc); VirtualContainer getContainer(LinkedList<String> workDir); VirtualContainer getContainer(String containerPath); static Pattern PtDoc; static Pattern PtSigns; static Pattern PtSign; static Pattern PtPages; static Pattern PtPage; static Pattern PtPageRes; static Pattern PtDocRes; }### Answer:
@Test void get() throws IOException, DocumentException { assertThrows(FileNotFoundException.class, () -> { try (OFDReader reader = new OFDReader(src)) { OFDDir ofdDir = reader.getOFDDir(); ResourceLocator rl = new ResourceLocator(ofdDir); OFD ofd = rl.get(ST_Loc.getInstance("Doc_0/OFD.xml"), OFD::new); } }); try (OFDReader reader = new OFDReader(src)) { OFDDir ofdDir = reader.getOFDDir(); ResourceLocator rl = new ResourceLocator(ofdDir); OFD ofd = rl.get("OFD.xml", OFD::new); assertEquals("6b9c7c83cff048e7b427ef0567f3e065", ofd.getDocBody().getDocInfo().getDocID()); assertEquals(ofd.getProxy(), ofdDir.getOfd().getProxy()); Page page = rl.get("/Doc_0/Pages/Page_0/Content.xml", Page::new); assertEquals(page.getProxy(), ofdDir.getDocDir("Doc_0") .getPages() .getByIndex(0) .getContent() .getProxy()); } }