@Test
public void testParse() throws IOException, GpuInfoException {

  File f = new File("tony-core/src/test/resources/nvidia-smi-sample-xml-output");
  String s = FileUtils.readFileToString(f, "UTF-8");
  GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
  GpuDeviceInformation info = parser.parseXml(s);
  Assert.assertEquals("375.66", info.getDriverVersion());
  Assert.assertEquals(2, info.getGpus().size());
  PerGpuDeviceInformation gpu1 = info.getGpus().get(1);
  Assert.assertEquals("Tesla P100-PCIE-12GB", gpu1.getProductName());
  Assert.assertEquals(12193, gpu1.getGpuFBMemoryUsage().getTotalMemoryMiB());
  Assert.assertEquals(16384, gpu1.getGpuMainMemoryUsage().getTotalMemoryMiB());
  Assert.assertEquals(10.3f,
      gpu1.getGpuUtilizations().getOverallGpuUtilization(), 1e-6);
}