### Question:
DownloadResourceService { public Resource getResourceByTemplate(String fileName) { return resourceLoader.getResource(CLASSPATH_PREFIX + fileName); }  Resource getResourceByTemplate(String fileName);  }### Answer:
@Test void getResourceByTemplate() { when(resourceLoader.getResource(any())).thenReturn(getResource()); Resource resource = downloadResourceService.getResourceByTemplate(FILE_NAME); assertEquals(FILE_NAME, resource.getFilename()); assertTrue(resource.exists()); }