class DefaultTemplateResolver implements TemplateResolver {

    protected URL resourceUrl(String templateName, Class<?> viewType) {
        String path = relativeResourcePath(templateName, viewType);
        return templateBase.getUrl(path);
    }

}

class DefaultTemplateResolverTest {

    private static final Charset DEFAULT_CHARSET;

    @Test
    public void testResourcePath_FilePathBase() throws IOException {


        DefaultTemplateResolver resolver = resolver("/tmp");

        File canonical = new File("/tmp/io/bootique/mvc/resolver/tName.txt").getCanonicalFile();

        assertEquals(canonical.toURI().toURL(),
                resolver.resourceUrl("tName.txt", DefaultTemplateResolverTest.class));
        assertEquals(canonical.toURI().toURL(),
                resolver.resourceUrl("/tName.txt", DefaultTemplateResolverTest.class));
    }

}