@Test
public void testQuota() throws IOException
{

    String json = "{\"resources\":{\"RAM\":{\"resource\":{\"type\":\"ram\",\"value\":\"512.000MiB\"},"
            + "\"threshold\":0},\"DISK\":{\"resource\":{\"type\":\"disk\",\"value\":\"1024.00000KiB\"},"
            + "\"threshold\":0},\"CPU\":{\"resource\":{\"type\":\"cpu\",\"value\":\"25%\"},\"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.MB )
                 .doubleValue() );
}