@Test void getReferenceWhenNull() { assertNull(this.factory.getReference(null)); }
public <E extends EntityReference> E getReference(E reference) { if (reference == null) { return null; } EntityReference entityReference = this.cache.get(reference); if (entityReference == null || !reference.getClass().isAssignableFrom(entityReference.getClass())) { entityReference = unique(reference); this.cache.put(entityReference, entityReference); } return (E) entityReference; }
EntityReferenceFactory { public <E extends EntityReference> E getReference(E reference) { if (reference == null) { return null; } EntityReference entityReference = this.cache.get(reference); if (entityReference == null || !reference.getClass().isAssignableFrom(entityReference.getClass())) { entityReference = unique(reference); this.cache.put(entityReference, entityReference); } return (E) entityReference; } }
EntityReferenceFactory { public <E extends EntityReference> E getReference(E reference) { if (reference == null) { return null; } EntityReference entityReference = this.cache.get(reference); if (entityReference == null || !reference.getClass().isAssignableFrom(entityReference.getClass())) { entityReference = unique(reference); this.cache.put(entityReference, entityReference); } return (E) entityReference; }  }
EntityReferenceFactory { public <E extends EntityReference> E getReference(E reference) { if (reference == null) { return null; } EntityReference entityReference = this.cache.get(reference); if (entityReference == null || !reference.getClass().isAssignableFrom(entityReference.getClass())) { entityReference = unique(reference); this.cache.put(entityReference, entityReference); } return (E) entityReference; }  E getReference(E reference); }
EntityReferenceFactory { public <E extends EntityReference> E getReference(E reference) { if (reference == null) { return null; } EntityReference entityReference = this.cache.get(reference); if (entityReference == null || !reference.getClass().isAssignableFrom(entityReference.getClass())) { entityReference = unique(reference); this.cache.put(entityReference, entityReference); } return (E) entityReference; }  E getReference(E reference);  }