### Question:
TemplateHelper { public Resource getFileResource(String resourcePath, String resourceExtension) { String adaptedFileExtension = resourceExtension; if (StringUtils.hasLength(resourceExtension) && !StringUtils.startsWithIgnoreCase(resourceExtension, ".")) { adaptedFileExtension = "." + resourceExtension; } return new ClassPathResource(basePath + resourcePath + adaptedFileExtension); } private  TemplateHelper(String basePath, Charset charset); static TemplateHelper instance(String basePath, Charset charset); static TemplateHelper instance(String basePath); String getXmlMessageTemplate(String templatePath); String getJsonMessageTemplate(String templatePath); String getMessageTemplate(String templatePath, String templateExtension); Resource getFileResource(String resourcePath, String resourceExtension);  }### Answer:
@Test(dataProvider = "fileResourceDP") public void testGetFileResource(String basePath, String fileName, String fileExtension, boolean shouldExist) throws Exception { final TemplateHelper testling = TemplateHelper.instance(basePath, UTF_8); final Resource fileResource = testling.getFileResource(fileName, fileExtension); Assert.assertEquals(shouldExist, fileResource.exists()); }