@Test(expected = NullPointerException.class) public void testNullInput() { DependencyMapper.toDTO(null); }
public static DependencyDTO toDTO(Dependency dependency) { checkNotNull(dependency, "dependency"); DependencyDTO result = new DependencyDTO(); result.setSourceName(dependency.getSource().getName()); result.setTargetName(dependency.getTarget().getName()); result.setTypeName(dependency.getDependencyType().name()); result.setBaseDependencies(mapBaseDependencies(dependency.getBaseDependencies())); result.setProperties(mapProperties(dependency.getProperties())); return result; }
DependencyMapper { public static DependencyDTO toDTO(Dependency dependency) { checkNotNull(dependency, "dependency"); DependencyDTO result = new DependencyDTO(); result.setSourceName(dependency.getSource().getName()); result.setTargetName(dependency.getTarget().getName()); result.setTypeName(dependency.getDependencyType().name()); result.setBaseDependencies(mapBaseDependencies(dependency.getBaseDependencies())); result.setProperties(mapProperties(dependency.getProperties())); return result; } }
DependencyMapper { public static DependencyDTO toDTO(Dependency dependency) { checkNotNull(dependency, "dependency"); DependencyDTO result = new DependencyDTO(); result.setSourceName(dependency.getSource().getName()); result.setTargetName(dependency.getTarget().getName()); result.setTypeName(dependency.getDependencyType().name()); result.setBaseDependencies(mapBaseDependencies(dependency.getBaseDependencies())); result.setProperties(mapProperties(dependency.getProperties())); return result; } private  DependencyMapper(); }
DependencyMapper { public static DependencyDTO toDTO(Dependency dependency) { checkNotNull(dependency, "dependency"); DependencyDTO result = new DependencyDTO(); result.setSourceName(dependency.getSource().getName()); result.setTargetName(dependency.getTarget().getName()); result.setTypeName(dependency.getDependencyType().name()); result.setBaseDependencies(mapBaseDependencies(dependency.getBaseDependencies())); result.setProperties(mapProperties(dependency.getProperties())); return result; } private  DependencyMapper(); static DependencyDTO toDTO(Dependency dependency); }
DependencyMapper { public static DependencyDTO toDTO(Dependency dependency) { checkNotNull(dependency, "dependency"); DependencyDTO result = new DependencyDTO(); result.setSourceName(dependency.getSource().getName()); result.setTargetName(dependency.getTarget().getName()); result.setTypeName(dependency.getDependencyType().name()); result.setBaseDependencies(mapBaseDependencies(dependency.getBaseDependencies())); result.setProperties(mapProperties(dependency.getProperties())); return result; } private  DependencyMapper(); static DependencyDTO toDTO(Dependency dependency);  }