StandardPseudoFunctionFactory { public static StandardPseudoFunction getByName(String functionName) { StandardPseudoFunction standardPseudoFunction = ALL.get(functionName.toLowerCase(Locale.ENGLISH)); return standardPseudoFunction != null ? standardPseudoFunction : new UnknownPseudoFunction(functionName); } private  StandardPseudoFunctionFactory(); static StandardPseudoFunction getByName(String functionName); static List<StandardPseudoFunction> getAll();  }
@Test public void should_return_a_valid_has_pseudo_function_object() { StandardPseudoFunction function = StandardPseudoFunctionFactory.getByName("has"); assertEquals(Has.class, function.getClass()); assertEquals(function.getName(), "has"); assertEquals(function.getLinks().size(), 1); assertEquals(function.getLinks().get(0), "https: assertEquals(function.isExperimental(), true); assertEquals(function.isObsolete(), false); }
@Test public void should_return_a_valid_has_pseudo_function_object_uppercase_test() { StandardPseudoFunction function = StandardPseudoFunctionFactory.getByName("HAS"); assertEquals(Has.class, function.getClass()); assertEquals(function.getName(), "has"); assertEquals(function.getLinks().size(), 1); assertEquals(function.getLinks().get(0), "https: assertEquals(function.isExperimental(), true); assertEquals(function.isObsolete(), false); }
@Test public void should_return_a_valid_has_pseudo_function_object_mix_uppercase_lowercase_test() { StandardPseudoFunction function = StandardPseudoFunctionFactory.getByName("HaS"); assertEquals(Has.class, function.getClass()); assertEquals(function.getName(), "has"); assertEquals(function.getLinks().size(), 1); assertEquals(function.getLinks().get(0), "https: assertEquals(function.isExperimental(), true); assertEquals(function.isObsolete(), false); }