@Test
public void testGpuGetsUnassignedWhenStateStoreThrowsException()
    throws ResourceHandlerException, IOException {

  doThrow(new IOException("Failed to save container mappings " +
      "to NM state store!"))
      .when(nmStateStore).storeAssignedResources(any(Container.class),
      anyString(), anyList());
  createAndAddGpus(1);
  exception.expect(ResourceHandlerException.class);
  exception.expectMessage("Failed to save container mappings " +
      "to NM state store");
  Container container = createMockContainer(1, 5L);
  testSubject.assignGpus(container);
}