@Test
public void testRenderResourcesString() {

  CustomResourceTypesConfigurationProvider.
      initResourceTypes(ResourceInformation.GPU_URI);
  Resource resource = ResourceTypesTestHelper.newResource(
      DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_MB,
      DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES,
      ImmutableMap.<String, String>builder()
          .put(ResourceInformation.GPU_URI, "5").build());
  ContainerBlock block = new ContainerBlock(
      mock(ApplicationBaseProtocol.class),
      mock(View.ViewContext.class));
  ContainerReport containerReport = createContainerReport();
  containerReport.setAllocatedResource(resource);
  ContainerInfo containerInfo = new ContainerInfo(containerReport);
  String resources = block.getResources(containerInfo);
  Assert.assertEquals("8192 Memory, 4 VCores, 5 yarn.io/gpu", resources);
}