@Test
public void testEqualsHashCode() throws Exception
{

    //check equals
    ContainerHostInfo containerHostInfo2 = JsonUtil.fromJson( INFO_JSON, ContainerHostInfoModel.class );
    assertEquals( containerHostInfo, containerHostInfo2 );
    assertFalse( containerHostInfo.equals( new Object() ) );
    ContainerHostInfo containerHostInfo3 = JsonUtil.fromJson( INFO2_JSON, ContainerHostInfoModel.class );
    assertNotEquals( containerHostInfo, containerHostInfo3 );
    //check hash
    Map<ContainerHostInfo, ContainerHostInfo> map = Maps.newHashMap();
    map.put( containerHostInfo2, containerHostInfo2 );
    assertEquals( containerHostInfo2, map.get( containerHostInfo ) );
}