@Test
public void createGroupWithRepoAndDelete()
throws Exception
{
GroupMessageUtil groupUtil = new GroupMessageUtil(getXMLXStream(), MediaType.APPLICATION_XML);
RepositoryGroupResource resource = new RepositoryGroupResource();
resource.setExposed(true);
resource.setFormat("maven2");
resource.setId("nonemptygroup");
resource.setName("nonemptygroup");
resource.setProvider("maven2");
RepositoryGroupMemberRepository member = new RepositoryGroupMemberRepository();
member.setId(REPO_TEST_HARNESS_REPO);
resource.addRepository(member);
resource = groupUtil.createGroup(resource);
resource.getRepositories().clear();
resource = groupUtil.updateGroup(resource);
Assert.assertEquals(0, resource.getRepositories().size());
}