test_class.declarator: jarFile
test_class.modifier: private static
test_class.original_string: private static File jarFile;
test_class.type: File
test_class.var_name: jarFile
test_class.declarator: jarUri
test_class.modifier: private static
test_class.original_string: private static URI jarUri;
test_class.type: URI
test_class.var_name: jarUri
test_class.file: cassandra-migration/src/test/java/org/cognitor/cassandra/migration/scanner/JarLocationScannerTest.java
test_class.identifier: JarLocationScannerTest
test_case.body: @Test
      public void shouldReturnTwoResourcesWhenJarFileWithOneScriptGiven() throws Exception {
          LocationScanner scanner = new JarLocationScanner();
          Set<String> resourceNames = scanner.findResourceNames("/", jarUri);
          assertThat(resourceNames.size(), is(equalTo(2)));
          assertThat(resourceNames.contains("1_init.cql"), is(true));
          assertThat(resourceNames.contains("META-INF/MANIFEST.MF"), is(true));
      }
test_case.class_method_signature: JarLocationScannerTest.shouldReturnTwoResourcesWhenJarFileWithOneScriptGiven()
test_case.full_signature: @Test public void shouldReturnTwoResourcesWhenJarFileWithOneScriptGiven()
test_case.identifier: shouldReturnTwoResourcesWhenJarFileWithOneScriptGiven
test_case.invocations: findResourceNames assertThat size is equalTo assertThat contains is assertThat contains is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldReturnTwoResourcesWhenJarFileWithOneScriptGiven()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(JarLocationScanner.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(JarLocationScanner.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: cassandra-migration/src/main/java/org/cognitor/cassandra/migration/scanner/JarLocationScanner.java
focal_class.identifier: JarLocationScanner
focal_class.interfaces: implements LocationScanner
focal_class.class_method_signature: JarLocationScanner.findResourceNames(String location, URI locationUri)
focal_class.full_signature: @Override public Set<String> findResourceNames(String location, URI locationUri)
focal_class.identifier: findResourceNames
focal_class.modifiers: @Override public
focal_class.parameters: (String location, URI locationUri)
focal_class.return: Set<String>
focal_class.signature: Set<String> findResourceNames(String location, URI locationUri)
focal_class.class_method_signature: JarLocationScanner.getFileSystem(URI location)
focal_class.full_signature: private FileSystem getFileSystem(URI location)
focal_class.identifier: getFileSystem
focal_class.modifiers: private
focal_class.parameters: (URI location)
focal_class.return: FileSystem
focal_class.signature: FileSystem getFileSystem(URI location)
focal_class.class_method_signature: JarLocationScanner.normalizePath(String pathName)
focal_class.full_signature: private static String normalizePath(String pathName)
focal_class.identifier: normalizePath
focal_class.modifiers: private static
focal_class.parameters: (String pathName)
focal_class.return: String
focal_class.signature: String normalizePath(String pathName)
focal_method.body: @Override
      public Set<String> findResourceNames(String location, URI locationUri) throws IOException {
          notNullOrEmpty(location, "location");
          notNull(locationUri, "locationUri");
          LOGGER.debug("Scanning in jar {} in location {}", locationUri, location);
          try(FileSystem fileSystem = getFileSystem(locationUri)) {
              final Path systemPath = fileSystem.getPath(location);
              return Files.walk(systemPath)
                      .filter(Files::isRegularFile)
                      .map(path -> normalizePath(path.toString()))
                      .collect(toSet());
          }
      }
focal_method.class_method_signature: JarLocationScanner.findResourceNames(String location, URI locationUri)
focal_method.full_signature: @Override public Set<String> findResourceNames(String location, URI locationUri)
focal_method.identifier: findResourceNames
focal_method.invocations: notNullOrEmpty notNull debug getFileSystem getPath collect map filter walk normalizePath toString toSet
focal_method.modifiers: @Override public
focal_method.parameters: (String location, URI locationUri)
focal_method.return: Set<String>
focal_method.signature: Set<String> findResourceNames(String location, URI locationUri)