@Test public void testListEmpty() { SchoolLevelType type = SchoolLevelType.wrap(""); List<String> result = converter.convertAsList(type); Assert.assertEquals(0, result.size()); }
public List<String> convertAsList(SchoolLevelType schoolLevelType) { if (schoolLevelType == null) { return null; } ArrayList<String> list = new ArrayList<String>(); String category = SCHOOL_LEVEL_TYPE_MAP.get(schoolLevelType); if (category != null) { list.add(category); } return list; }
SchoolLevelTypeConverter { public List<String> convertAsList(SchoolLevelType schoolLevelType) { if (schoolLevelType == null) { return null; } ArrayList<String> list = new ArrayList<String>(); String category = SCHOOL_LEVEL_TYPE_MAP.get(schoolLevelType); if (category != null) { list.add(category); } return list; } }
SchoolLevelTypeConverter { public List<String> convertAsList(SchoolLevelType schoolLevelType) { if (schoolLevelType == null) { return null; } ArrayList<String> list = new ArrayList<String>(); String category = SCHOOL_LEVEL_TYPE_MAP.get(schoolLevelType); if (category != null) { list.add(category); } return list; }  }
SchoolLevelTypeConverter { public List<String> convertAsList(SchoolLevelType schoolLevelType) { if (schoolLevelType == null) { return null; } ArrayList<String> list = new ArrayList<String>(); String category = SCHOOL_LEVEL_TYPE_MAP.get(schoolLevelType); if (category != null) { list.add(category); } return list; }  String convert(SchoolLevelType schoolLevelType); List<String> convertAsList(SchoolLevelType schoolLevelType); }
SchoolLevelTypeConverter { public List<String> convertAsList(SchoolLevelType schoolLevelType) { if (schoolLevelType == null) { return null; } ArrayList<String> list = new ArrayList<String>(); String category = SCHOOL_LEVEL_TYPE_MAP.get(schoolLevelType); if (category != null) { list.add(category); } return list; }  String convert(SchoolLevelType schoolLevelType); List<String> convertAsList(SchoolLevelType schoolLevelType);  }