### Question:
GlobalJndiNamingStrategy implements IJndiNamingStrategy { @Override public String calculateName(String ejbName, Class<?> ejbType) { if (ejbName == null) { return baseName + ejbType.getName(); } return baseName + ejbName + "!" + ejbType.getName(); } GlobalJndiNamingStrategy(String moduleName);  GlobalJndiNamingStrategy(String appName, String moduleName); @Override String calculateName(String ejbName, Class<?> ejbType);  }### Answer:
@Test public void nameAccordingToSpecification() { Assert.assertEquals(namingStrategy.calculateName(null, String.class), "java:global/appname/modulename/java.lang.String"); Assert.assertEquals(namingStrategy.calculateName("beanname", String.class), "java:global/appname/modulename/beanname!java.lang.String"); }