@Test
public void testAssignedResourcesCanDeserializePreviouslySerializedValues() {

  try {
    byte[] serializedString = toBytes(testResources.getAssignedResources());
    ResourceMappings.AssignedResources deserialized =
        ResourceMappings.AssignedResources.fromBytes(serializedString);
    Assert.assertEquals(testResources.getAssignedResources(),
        deserialized.getAssignedResources());
  } catch (IOException e) {
    e.printStackTrace();
    Assert.fail(String.format("Deserialization of test AssignedResources " +
        "failed with %s", e.getMessage()));
  }
}