@Test
public void testGetResourceWithPercentage() {

  ConfigurableResource configurableResource =
      new ConfigurableResource(new double[] {0.5, 0.5});
  assertEquals(
      configurableResource.getResource(clusterResource).getMemorySize(),
      1024);
  assertEquals(
      configurableResource.getResource(clusterResource).getVirtualCores(), 1);
  assertNull("The absolute resource should be null since object"
          + " configurableResource is initialized with percentages",
      configurableResource.getResource());
  assertNull("The absolute resource should be null since cluster resource"
      + " is null", configurableResource.getResource(null));
}