@Test
public void testGetContainerHostState() throws Exception
{

    try
    {
        resourceHostEntity.getContainerHostState( containerHost );
        fail( "Expected ResourceHostException" );
    }
    catch ( ResourceHostException e )
    {
    }
    when( commandResult.getStdOut() ).thenReturn( CONTAINER_STATUS_STARTED );
    resourceHostEntity.addContainerHost( containerHost );
    ContainerHostState state = resourceHostEntity.getContainerHostState( containerHost );
    assertEquals( ContainerHostState.RUNNING, state );
    when( commandResult.getStdOut() ).thenReturn( "" );
    state = resourceHostEntity.getContainerHostState( containerHost );
    assertEquals( ContainerHostState.UNKNOWN, state );
    doThrow( new CommandException( "" ) ).when( commandUtil )
                                         .execute( any( RequestBuilder.class ), eq( resourceHostEntity ) );
    try
    {
        resourceHostEntity.getContainerHostState( containerHost );
        fail( "Expected ResourceHostException" );
    }
    catch ( ResourceHostException e )
    {
    }
}