@Test
public void testCheckManagement() throws Exception
{

    RequestedHost requestedHost = mock( RequestedHost.class );
    doReturn( ResourceHostRegistrationStatus.REQUESTED ).when( requestedHost ).getStatus();
    doReturn( true ).when( registrationManager ).containsManagementContainer( anySet() );
    registrationManager.checkManagement( requestedHost );
    verify( registrationManager, never() ).approveRequest( anyString() );
    //-----
    doReturn( Sets.newHashSet() ).when( requestDataService ).getAll();
    registrationManager.checkManagement( requestedHost );
    verify( registrationManager ).approveRequest( anyString() );
}