### Question:
MavenContentHelper { static String getArtifactExtension( ItemSelector selector ) { if ( selector.hasExtension( ) ) { return selector.getExtension( ); } else if ( selector.hasType( ) ) { final String type = selector.getType( ).trim().toLowerCase( ); switch (type.length()) { case 3: if ("pom".equals(type) || "war".equals(type) || "ear".equals(type) || "rar".equals(type)) { return type; } default: return "jar"; } } else { return "jar"; } } MavenContentHelper(); void setMetadataReader( MavenMetadataReader metadataReader ); static String getNamespaceFromNamespacePath( final StorageAsset namespacePath); String getArtifactVersion( StorageAsset artifactDir, ItemSelector selector); String getLatestArtifactSnapshotVersion( StorageAsset artifactDir, String snapshotVersion); static final Pattern UNIQUE_SNAPSHOT_NUMBER_PATTERN; static final String METADATA_FILENAME; static final String METADATA_REPOSITORY_FILENAME; }### Answer:
@Test void getArtifactExtension( ) { assertExtension( "test", "", "test" ); assertExtension( "jar", "javadoc", "" ); assertExtension( "war", "war", "" ); assertExtension( "ear", "ear", "" ); assertExtension( "rar", "rar", "" ); assertExtension( "jar", "", "" ); }