@Test public void testOfName() { NameOrCrn nameOrCrn = NameOrCrn.ofName(NAME); assertEquals(NAME, nameOrCrn.name); }
public static NameOrCrn ofName(String name) { if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException(NAME_MUST_BE_PROVIDED_EXCEPTION_MESSAGE); } return new NameOrCrn(name, null); }
NameOrCrn { public static NameOrCrn ofName(String name) { if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException(NAME_MUST_BE_PROVIDED_EXCEPTION_MESSAGE); } return new NameOrCrn(name, null); } }
NameOrCrn { public static NameOrCrn ofName(String name) { if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException(NAME_MUST_BE_PROVIDED_EXCEPTION_MESSAGE); } return new NameOrCrn(name, null); } private  NameOrCrn(String name, String crn); }
NameOrCrn { public static NameOrCrn ofName(String name) { if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException(NAME_MUST_BE_PROVIDED_EXCEPTION_MESSAGE); } return new NameOrCrn(name, null); } private  NameOrCrn(String name, String crn); static NameOrCrn ofName(String name); static NameOrCrn ofCrn(String crn); static NameOrCrn empty(); String getName(); String getCrn(); boolean hasName(); boolean hasCrn(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
NameOrCrn { public static NameOrCrn ofName(String name) { if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException(NAME_MUST_BE_PROVIDED_EXCEPTION_MESSAGE); } return new NameOrCrn(name, null); } private  NameOrCrn(String name, String crn); static NameOrCrn ofName(String name); static NameOrCrn ofCrn(String crn); static NameOrCrn empty(); String getName(); String getCrn(); boolean hasName(); boolean hasCrn(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }