@Test public void testNullObject() { OtherNames sifOtherNames = null; List<OtherName> result = converter.convert(sifOtherNames); Assert.assertNull("OtherName list should be null", result); }
public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; }
OtherNamesConverter { public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; } }
OtherNamesConverter { public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; }  }
OtherNamesConverter { public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; }  List<OtherName> convert(OtherNames sifOtherNames); void setNameConverter(NameConverter nameConverter); }
OtherNamesConverter { public List<OtherName> convert(OtherNames sifOtherNames) { if (sifOtherNames == null) { return null; } List<OtherName> sliNames = new ArrayList<OtherName>(); for (openadk.library.common.Name sifName : sifOtherNames) { OtherName sliName = new OtherName(); nameConverter.mapSifNameIntoSliName(sifName, sliName); sliName.setOtherNameType(NAME_TYPE_MAP.get(sifName.getType())); sliNames.add(sliName); } return sliNames; }  List<OtherName> convert(OtherNames sifOtherNames); void setNameConverter(NameConverter nameConverter);  }