ResourceMappings { public List<Serializable> getAssignedResources(String resourceType) { AssignedResources ar = assignedResourcesMap.get(resourceType); if (null == ar) { return Collections.emptyList(); } return ar.getAssignedResources(); }  List<Serializable> getAssignedResources(String resourceType); void addAssignedResources(String resourceType,
      AssignedResources assigned);  }
@Test public void testSerializeAssignedResourcesWithSerializationUtils() { try { byte[] serializedString = testResources.toBytes(); ResourceMappings.AssignedResources deserialized = ResourceMappings.AssignedResources.fromBytes(serializedString); Assert.assertEquals(testResources.getAssignedResources(), deserialized.getAssignedResources()); } catch (IOException e) { e.printStackTrace(); Assert.fail(String.format("Serialization of test AssignedResources " + "failed with %s", e.getMessage())); } }
@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())); } }