StandardPseudoIdentifierFactory { public static StandardPseudoIdentifier getByName(String identifier) { StandardPseudoIdentifier standardPseudoIdentifier = ALL.get(identifier.toLowerCase(Locale.ENGLISH)); return standardPseudoIdentifier != null ? standardPseudoIdentifier : new UnknownPseudoIdentifier(identifier); } private  StandardPseudoIdentifierFactory(); static StandardPseudoIdentifier getByName(String identifier); static List<StandardPseudoIdentifier> getAll();  }
@Test public void should_return_a_valid_first_line_identifier_function_object() { StandardPseudoIdentifier identifier = StandardPseudoIdentifierFactory.getByName("first-line"); assertEquals(FirstLine.class, identifier.getClass()); assertEquals(identifier.getName(), "first-line"); assertEquals(identifier.getLinks().size(), 1); assertEquals(identifier.getLinks().get(0), "https: assertEquals(identifier.isExperimental(), false); assertEquals(identifier.isObsolete(), false); }
@Test public void should_return_a_valid_first_line_pseudo_identifier_object_uppercase_test() { StandardPseudoIdentifier identifier = StandardPseudoIdentifierFactory.getByName("FIRST-LINE"); assertEquals(FirstLine.class, identifier.getClass()); assertEquals(identifier.getName(), "first-line"); assertEquals(identifier.getLinks().size(), 1); assertEquals(identifier.getLinks().get(0), "https: assertEquals(identifier.isExperimental(), false); assertEquals(identifier.isObsolete(), false); }
@Test public void should_return_a_valid_first_line_pseudo_identifier_object_mix_uppercase_lowercase_test() { StandardPseudoIdentifier identifier = StandardPseudoIdentifierFactory.getByName("FIRSt-LINE"); assertEquals(FirstLine.class, identifier.getClass()); assertEquals(identifier.getName(), "first-line"); assertEquals(identifier.getLinks().size(), 1); assertEquals(identifier.getLinks().get(0), "https: assertEquals(identifier.isExperimental(), false); assertEquals(identifier.isObsolete(), false); }