@Test public void testFrom() throws Exception { ClassType classType = Mockito.mock(ClassType.class); Identifier id = testObject.from(classType); Assert.assertNotNull(id); Identifier dupId = testObject.from(classType); Assert.assertEquals(id, dupId); }
public Identifier from(final T key) { if (key == null) { throw new IllegalArgumentException("name"); } if (data.containsKey(key)) { return data.get(key); } else { final Identifier reference = Identifier.random(); data.put(key, reference); return reference; } }
Xsd2UmlLookup { public Identifier from(final T key) { if (key == null) { throw new IllegalArgumentException("name"); } if (data.containsKey(key)) { return data.get(key); } else { final Identifier reference = Identifier.random(); data.put(key, reference); return reference; } } }
Xsd2UmlLookup { public Identifier from(final T key) { if (key == null) { throw new IllegalArgumentException("name"); } if (data.containsKey(key)) { return data.get(key); } else { final Identifier reference = Identifier.random(); data.put(key, reference); return reference; } }  }
Xsd2UmlLookup { public Identifier from(final T key) { if (key == null) { throw new IllegalArgumentException("name"); } if (data.containsKey(key)) { return data.get(key); } else { final Identifier reference = Identifier.random(); data.put(key, reference); return reference; } }  Identifier from(final T key); }
Xsd2UmlLookup { public Identifier from(final T key) { if (key == null) { throw new IllegalArgumentException("name"); } if (data.containsKey(key)) { return data.get(key); } else { final Identifier reference = Identifier.random(); data.put(key, reference); return reference; } }  Identifier from(final T key);  }