@Test
public void testEqualsHashCode() throws Exception
{

    //check equals
    ResourceHostInfo resourceHostInfo2 = JsonUtil.fromJson( INFO_JSON, ResourceHostInfoModel.class );
    assertEquals( resourceHostInfo, resourceHostInfo2 );
    assertFalse( resourceHostInfo.equals( new Object() ) );
    ResourceHostInfo resourceHostInfo3 = JsonUtil.fromJson( INFO2_JSON, ResourceHostInfoModel.class );
    assertNotEquals( resourceHostInfo, resourceHostInfo3 );
    //check hash
    Map<ResourceHostInfo, ResourceHostInfo> map = Maps.newHashMap();
    map.put( resourceHostInfo2, resourceHostInfo2 );
    assertEquals( resourceHostInfo2, map.get( resourceHostInfo ) );
}