### Question:
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } FileSystemTemplateLocator(int priority, String rootPath);  FileSystemTemplateLocator(int priority, String rootPath,
            String suffix); @Override Reader locateRealPath(String realPath); static Builder builder();  }### Answer:
@Test public void testLocatorNoSuffix() throws IOException { TemplateLocator locator = FileSystemTemplateLocator.builder() .setRootPath("src/test/resources/locator/file").build(); MustacheEngineBuilder.newBuilder().addTemplateLocator(locator).build(); Set<String> ids = locator.getAllIdentifiers(); assertEquals(7, ids.size()); assertTrue(ids.contains("index.foo")); assertTrue(ids.contains("home.foo")); assertTrue(ids.contains("foo.foo")); assertTrue(ids.contains("detail.html")); assertTrue(ids.contains("encoding.html")); assertTrue(ids.contains("sub/bar.foo")); assertTrue(ids.contains("sub/subsub/qux.foo")); assertEquals("{{foo}}", read(locator.locate("index.foo"))); assertEquals("bar", read(locator.locate("home.foo"))); assertEquals("foo", read(locator.locate("foo.foo"))); assertEquals("<html/>", read(locator.locate("detail.html"))); assertEquals("{{foo}}", read(locator.locate("sub/bar.foo"))); assertEquals("{{bar}}", read(locator.locate("sub/subsub/qux.foo"))); }
@Test public void testCustomVirtualPathSeparator() throws IOException { TemplateLocator locator = FileSystemTemplateLocator.builder() .setPriority(1).setRootPath("src/test/resources/locator/file") .setSuffix("foo").build(); MustacheEngineBuilder.newBuilder().addTemplateLocator(locator) .setProperty(PathTemplateLocator.VIRTUAL_PATH_SEPARATOR_KEY, "*") .build(); Set<String> names = locator.getAllIdentifiers(); assertEquals(5, names.size()); assertTrue(names.contains("index")); assertTrue(names.contains("home")); assertTrue(names.contains("foo")); assertTrue(names.contains("sub*bar")); assertTrue(names.contains("sub*subsub*qux")); assertEquals("{{foo}}", read(locator.locate("index"))); assertEquals("bar", read(locator.locate("home"))); assertEquals("{{foo}}", read(locator.locate("sub*bar"))); assertEquals("{{bar}}", read(locator.locate("sub*subsub*qux"))); }