}
@Test
public void findTemplateSource() throws IOException {
// test.ftl
TemplateSource source1 = (TemplateSource) freemarkerLoader.findTemplateSource("test.ftl");
assertEquals("test", readText(source1.getInputStream()));
freemarkerLoader.closeTemplateSource(source1);
// test.ftl again
TemplateSource source2 = (TemplateSource) freemarkerLoader.findTemplateSource("test.ftl");
assertEquals("test", readText(source2.getInputStream()));
freemarkerLoader.closeTemplateSource(source2);
// test.ftl == test.ftl
assertThat(source1.hashCode(), equalTo(source2.hashCode()));
assertThat(source1, equalTo(source2));
// test1.ftl
TemplateSource source3 = (TemplateSource) freemarkerLoader.findTemplateSource("test2.ftl");
assertEquals("test2", readText(source3.getInputStream()));
freemarkerLoader.closeTemplateSource(source3);
// test.ftl != test1.ftl
assertThat(source1.hashCode(), not(equalTo(source3.hashCode())));
assertThat(source1, not(equalTo(source3)));
// ģ����Ϊ��
try {
freemarkerLoader.findTemplateSource(null);