@Test public void testReadItems() { ModsDefinition mods = new ModsDefinition(); mods.getClassification().add(classificationType(Type.DDC.getText(), "ddc[0]")); mods.getClassification().add(classificationType(Type.DDC.getText(), "ddc[1]")); mods.getClassification().add(classificationType(Type.UDC.getText(), "udc[2]")); mods.getClassification().add(classificationType(null, "unknown[3]")); mods.getClassification().add(classificationType(Type.UDC.getText(), "udc[4]")); ClassificationMapper instance = new ClassificationMapper(); List<ClassificationItem> expResult = Arrays.asList( new ClassificationItem(0, Type.DDC, "ddc[0]"), new ClassificationItem(1, Type.DDC, "ddc[1]"), new ClassificationItem(2, Type.UDC, "udc[2]"), new ClassificationItem(3, Type.OTHER, null), new ClassificationItem(4, Type.UDC, "udc[4]") ); List<ClassificationItem> result = instance.map(mods); assertThat(result, Is.is(expResult)); }
public List<ClassificationItem> map(ModsDefinition mods) { List<ClassificationDefinition> classifications = mods.getClassification(); return classificationMap.map(classifications); }
ClassificationMapper { public List<ClassificationItem> map(ModsDefinition mods) { List<ClassificationDefinition> classifications = mods.getClassification(); return classificationMap.map(classifications); } }
ClassificationMapper { public List<ClassificationItem> map(ModsDefinition mods) { List<ClassificationDefinition> classifications = mods.getClassification(); return classificationMap.map(classifications); }  }
ClassificationMapper { public List<ClassificationItem> map(ModsDefinition mods) { List<ClassificationDefinition> classifications = mods.getClassification(); return classificationMap.map(classifications); }  List<ClassificationPair> mapPairs(ModsDefinition mods); ModsDefinition mapPairs(ModsDefinition mods, List<ClassificationPair> pairs); List<ClassificationItem> map(ModsDefinition mods); ModsDefinition map(ModsDefinition mods, List<ClassificationItem> items); }
ClassificationMapper { public List<ClassificationItem> map(ModsDefinition mods) { List<ClassificationDefinition> classifications = mods.getClassification(); return classificationMap.map(classifications); }  List<ClassificationPair> mapPairs(ModsDefinition mods); ModsDefinition mapPairs(ModsDefinition mods, List<ClassificationPair> pairs); List<ClassificationItem> map(ModsDefinition mods); ModsDefinition map(ModsDefinition mods, List<ClassificationItem> items);  }