assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
}
createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath() );
BrowseService browseService = getBrowseService( authorizationHeader, false );
Map<String, String> metadatas =
toMap( browseService.getMetadatas( "commons-cli", "commons-cli", "1.0", testRepoId ) );
assertThat( metadatas ).isNotNull().isEmpty();
browseService.addMetadata( "commons-cli", "commons-cli", "1.0", "wine", "bordeaux", testRepoId );
metadatas = toMap( browseService.getMetadatas( "commons-cli", "commons-cli", "1.0", testRepoId ) );
assertThat( metadatas ).isNotNull().isNotEmpty().contains( MapEntry.entry( "wine", "bordeaux" ) );
browseService.deleteMetadata( "commons-cli", "commons-cli", "1.0", "wine", testRepoId );
metadatas = toMap( browseService.getMetadatas( "commons-cli", "commons-cli", "1.0", testRepoId ) );
assertThat( metadatas ).isNotNull().isEmpty();
deleteTestRepo( testRepoId );