@Test(expected = NullPointerException.class) public void convert_NULL() { converter.convert(null); }
public YSettings convert(UiySettings uiySettings) { Preconditions.checkNotNull(uiySettings); YSettings ysettings = new YSettings(); YValueType yValueType = new NumberYValue(); if (uiySettings.getValueType().equals(UiyValueType.PERCENT)) { yValueType = new RateYValue(100); } else if (uiySettings.getValueType().equals(UiyValueType.NUMBER_PER_1000)) { yValueType = new RateYValue(1000); } ysettings.setValueType(yValueType); return ysettings; }
UiySettingsConverter { public YSettings convert(UiySettings uiySettings) { Preconditions.checkNotNull(uiySettings); YSettings ysettings = new YSettings(); YValueType yValueType = new NumberYValue(); if (uiySettings.getValueType().equals(UiyValueType.PERCENT)) { yValueType = new RateYValue(100); } else if (uiySettings.getValueType().equals(UiyValueType.NUMBER_PER_1000)) { yValueType = new RateYValue(1000); } ysettings.setValueType(yValueType); return ysettings; } }
UiySettingsConverter { public YSettings convert(UiySettings uiySettings) { Preconditions.checkNotNull(uiySettings); YSettings ysettings = new YSettings(); YValueType yValueType = new NumberYValue(); if (uiySettings.getValueType().equals(UiyValueType.PERCENT)) { yValueType = new RateYValue(100); } else if (uiySettings.getValueType().equals(UiyValueType.NUMBER_PER_1000)) { yValueType = new RateYValue(1000); } ysettings.setValueType(yValueType); return ysettings; }  }
UiySettingsConverter { public YSettings convert(UiySettings uiySettings) { Preconditions.checkNotNull(uiySettings); YSettings ysettings = new YSettings(); YValueType yValueType = new NumberYValue(); if (uiySettings.getValueType().equals(UiyValueType.PERCENT)) { yValueType = new RateYValue(100); } else if (uiySettings.getValueType().equals(UiyValueType.NUMBER_PER_1000)) { yValueType = new RateYValue(1000); } ysettings.setValueType(yValueType); return ysettings; }  YSettings convert(UiySettings uiySettings); }
UiySettingsConverter { public YSettings convert(UiySettings uiySettings) { Preconditions.checkNotNull(uiySettings); YSettings ysettings = new YSettings(); YValueType yValueType = new NumberYValue(); if (uiySettings.getValueType().equals(UiyValueType.PERCENT)) { yValueType = new RateYValue(100); } else if (uiySettings.getValueType().equals(UiyValueType.NUMBER_PER_1000)) { yValueType = new RateYValue(1000); } ysettings.setValueType(yValueType); return ysettings; }  YSettings convert(UiySettings uiySettings);  }