### Question:
ClasspathLicenseLocator extends ResourceLoaderLicenseLocator { @Override protected InputStream getResourceAsStream(String resourceName) { return classLoader.getResourceAsStream(resourceName); } ClasspathLicenseLocator(ClassLoader classLoader, Charset charset, String...licenseFiles);   }### Answer:
@Test public void shouldReturnFullLicenseContents() { String licenseName = "aaa"; String licenseText = "some\nsample license\ntext"; testLocator = new ClasspathLicenseLocator(mockClassLoader, UTF8, licenseName); given(mockClassLoader.getResourceAsStream(licenseName)) .willReturn(new ByteArrayInputStream(licenseText.getBytes(UTF8))); LicenseSet result = testLocator.getRequiredLicenses(); assertNotNull(result); assertEquals(result.getLicenses().size(), 1); assertEquals(result.getLicenses().get(0), new License(licenseName, licenseText)); }