@Test
public void testParseConsecutivelyWithSameParser()
    throws IOException, YarnException {

  File f = new File("src/test/resources/nvidia-smi-sample-output.xml");
  String s = FileUtils.readFileToString(f, UTF_8);
  for (int i = 0; i < 3; i++) {
    GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
    GpuDeviceInformation info = parser.parseXml(s);
    assertEquals("375.66", info.getDriverVersion());
    assertEquals(2, info.getGpus().size());
    assertFirstGpu(info.getGpus().get(0));
    assertSecondGpu(info.getGpus().get(1));
  }
}