@Test
@Category(INDEX.class)
public void testTreeWithoutHint()
throws Exception
{
IndexBrowserTreeViewResponseDTO response =
getSearchMessageUtil().indexBrowserTreeView(REPO_TEST_HARNESS_REPO, "/");
Assert.assertEquals("There is one \"nexus3670\" group!", response.getData().getChildren().size(), 1);
// this is the G node of the "nexus3670" groupId (note: on G nodes, only the path is filled, but not the GAV!)
IndexBrowserTreeNodeDTO node = (IndexBrowserTreeNodeDTO) response.getData().getChildren().get(0);
// check path (note leading and trailing slashes!)
Assert.assertEquals("The path does not correspond to group!", node.getPath(), "/nexus3670/");
// get one level deeper
// but this path is also Group ID, hence response will contain whole tree!
response = getSearchMessageUtil().indexBrowserTreeView(REPO_TEST_HARNESS_REPO, node.getPath());
Assert.assertEquals("There are four \"nexus3670\" artifacts in a group!", response.getData().getChildren().size(),
4);
// this is group node
node = getNode(response, "known-artifact-a");