throws Exception
{
TaskScheduleUtil.waitForAllTasksToStop();
// groupId
SearchNGResponse results = getSearchMessageUtil().searchNGFor("nexus383");
Assert.assertEquals(results.getData().size(), 2);
// 3. negative test
results = getSearchMessageUtil().searchNGFor("nexus-383");
Assert.assertTrue(results.getData().isEmpty());
// artifactId
results = getSearchMessageUtil().searchNGFor("know-artifact-1", null, SearchType.EXACT);
Assert.assertEquals(1, results.getData().size());
// artifactId
results = getSearchMessageUtil().searchNGFor("know-artifact-2", null, SearchType.EXACT);
Assert.assertEquals(1, results.getData().size());
// partial artifactId
results = getSearchMessageUtil().searchNGFor("know-artifact");
Assert.assertEquals(2, results.getData().size());
// 3. negative test
results = getSearchMessageUtil().searchNGFor("unknow-artifacts");
Assert.assertTrue(results.getData().isEmpty());
// NEXUS-2724: the member changes should propagate to it's groups too
// has it propagated to group?
results =
getSearchMessageUtil().searchNGForGav("nexus383", "know-artifact-1", "1.0.0", null, null, "public", null);
Assert.assertEquals(1, results.getData().size());
results =
getSearchMessageUtil().searchNGForGav("nexus383", "know-artifact-2", "1.0.0", null, null, "public", null);
Assert.assertEquals(1, results.getData().size());
}