HL7DataTransformHelper { public static CE CEFactory(String code) { CE ce = new CE(); if (NullChecker.isNotNullish(code)) { LOG.debug("Setting the code attribute of CE --> code is not null"); ce.setCode(code); } return ce; }  static II IIFactory(String root); static II IIFactory(String root, String extension); static II IIFactory(String root, String extension, String assigningAuthorityName); static II IIFactoryCreateNull(); static CS CSFactory(String code); static CE CEFactory(String code); static CD CDFactory(String code); static CD CDFactory(String code, String codeSystem); static CD CDFactory(String code, String codeSystem, String displayName); static TSExplicit TSExplicitFactory(String value); static TSExplicit creationTimeFactory(); static ENExplicit convertPNToEN(PNExplicit pnName); static PNExplicit convertENtoPN(ENExplicit value); static ENExplicit createEnExplicit(String firstName, String middleName, String lastName, String title,
            String suffix); static PNExplicit createPNExplicit(String firstName, String lastName); static PNExplicit createPNExplicit(String firstName, String middleName, String lastName); static PNExplicit createPNExplicit(String firstName, String middleName, String lastName, String title,
            String suffix); static ADExplicit createADExplicit(boolean notOrdered, String street, String city, String state,
            String zip); static ADExplicit createADExplicit(String street, String city, String state, String zip); static ADExplicit createADExplicit(boolean notOrdered, String street, String street1, String city,
            String state, String zip); static ADExplicit createADExplicit(String street, String street1, String city, String state, String zip); static TELExplicit createTELExplicit(String value);  }
@Test public void CEFactory() { String code = "CONNECT"; CE ce = new CE(); HL7DataTransformHelper helper = new HL7DataTransformHelper(); ce = helper.CEFactory(code); assertEquals(ce.getCode(), code); }
@Test public void CEFactoryWhenCodeNull() { String code = null; CE ce = new CE(); HL7DataTransformHelper helper = new HL7DataTransformHelper(); ce = helper.CEFactory(code); assertNull(ce.getCode()); }