assertNotNull( action.getRepositoryGroups() );
assertEquals( 1, action.getRepositoryGroups().size() );
assertEquals( 2, action.getManagedRepositories().size() );
RepositoryGroup repoGroup = action.getRepositoryGroups().get( REPO_GROUP_ID );
assertEquals( 1, repoGroup.getRepositories().size() );
assertEquals( REPO1_ID, repoGroup.getRepositories().get( 0 ) );
assertNotNull( action.getGroupToRepositoryMap() );
assertEquals( 1, action.getGroupToRepositoryMap().size() );
List<String> repos = action.getGroupToRepositoryMap().get( repoGroup.getId() );
assertEquals( 1, repos.size() );
assertEquals( REPO2_ID, repos.get( 0 ) );
action.setRepoGroupId( REPO_GROUP_ID );
action.setRepoId( REPO1_ID );
result = action.removeRepositoryFromGroup();
assertEquals( Action.SUCCESS, result );
action.prepare();
result = action.execute();
assertEquals( Action.SUCCESS, result );
repoGroup = action.getRepositoryGroups().get( REPO_GROUP_ID );
assertEquals( 0, repoGroup.getRepositories().size() );
assertNotNull( action.getGroupToRepositoryMap() );
assertEquals( 1, action.getGroupToRepositoryMap().size() );
repos = action.getGroupToRepositoryMap().get( repoGroup.getId() );
assertEquals( 2, repos.size() );
assertEquals( REPO1_ID, repos.get( 0 ) );
assertEquals( REPO2_ID, repos.get( 1 ) );
}