### Question:
ClassPathEntry { public synchronized ImmutableSet<String> getFileNames() throws IOException { if (fileNames == null) { readFileNames(); } return fileNames; } ClassPathEntry(Path jar);  ClassPathEntry(Artifact artifact); Artifact getArtifact(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); synchronized ImmutableSet<String> getFileNames();  }### Answer:
@Test public void testGetClassNames() throws IOException, ArtifactResolutionException { Artifact artifact = resolveArtifact("com.google.truth.extensions:truth-java8-extension:1.0.1"); ClassPathEntry entry = new ClassPathEntry(artifact); ImmutableSet<String> classFileNames = entry.getFileNames(); Truth.assertThat(classFileNames).containsExactly( "com.google.common.truth.IntStreamSubject", "com.google.common.truth.LongStreamSubject", "com.google.common.truth.OptionalDoubleSubject", "com.google.common.truth.OptionalSubject", "com.google.common.truth.OptionalIntSubject", "com.google.common.truth.OptionalLongSubject", "com.google.common.truth.PathSubject", "com.google.common.truth.Truth8", "com.google.common.truth.StreamSubject"); }
@Test public void testGetClassNames_innerClasses() throws IOException, ArtifactResolutionException, URISyntaxException { ClassPathEntry entry = TestHelper.classPathEntryOfResource( "testdata/conscrypt-openjdk-uber-1.4.2.jar"); ImmutableSet<String> classFileNames = entry.getFileNames(); Truth.assertThat(classFileNames).containsAtLeast( "org.conscrypt.OpenSSLSignature$1", "org.conscrypt.OpenSSLContextImpl$TLSv1", "org.conscrypt.TrustManagerImpl$1", "org.conscrypt.PeerInfoProvider", "org.conscrypt.PeerInfoProvider$1", "org.conscrypt.ExternalSession$Provider", "org.conscrypt.OpenSSLMac"); }
@Test public void testGetClassNames_noManifest() throws IOException, ArtifactResolutionException, URISyntaxException { ClassPathEntry entry = TestHelper.classPathEntryOfResource( "testdata/conscrypt-openjdk-uber-1.4.2.jar"); ImmutableSet<String> classFileNames = entry.getFileNames(); for (String filename : classFileNames) { Assert.assertFalse(filename.toLowerCase(Locale.ENGLISH).contains("manifest")); Assert.assertFalse(filename.toLowerCase(Locale.ENGLISH).contains("meta")); } }