@Test
public void testQuota1() throws IOException
{

    String json = "{\"containerSize\":\"SMALL\",\"resources\":{\"RAM\":{\"resource\":{\"type\":\"ram\","
            + "\"value\":\"512.000MiB\"},\"threshold\":0},\"DISK\":{\"resource\":{\"type\":\"disk\","
            + "\"value\":\"1.00000GiB\"},\"threshold\":0},\"CPU\":{\"resource\":{\"type\":\"cpu\","
            + "\"value\":\"25%\"},\"threshold\":0},\"NET\":{\"resource\":{\"type\":\"net\","
            + "\"value\":\"100.000000Kbps\"},\"threshold\":0},\"CPUSET\":{\"resource\":{\"type\":\"cpuset\","
            + "\"value\":\"0-7\"},\"threshold\":0}}}";
    ObjectMapper mapper = new ObjectMapper();
    ContainerQuota quota = mapper.readValue( json, ContainerQuota.class );
    assertEquals( 512.0,
            quota.get( ContainerResourceType.RAM ).getAsRamResource().getResource().getValue( ByteUnit.MB )
                 .doubleValue() );
    assertEquals( 25.0,
            quota.get( ContainerResourceType.CPU ).getAsCpuResource().getResource().getValue().doubleValue() );
    assertEquals( 1.0,
            quota.get( ContainerResourceType.DISK ).getAsDiskResource().getResource().getValue( ByteUnit.GB )
                 .doubleValue() );
    assertEquals( "0-7", quota.get( ContainerResourceType.CPUSET ).getAsCpuSetResource().getResource().getValue() );
    assertEquals( 100.0D,
            quota.get( ContainerResourceType.NET ).getAsNetResource().getResource().getValue().doubleValue() );
}