@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void composeNull() throws Exception { composer.compose(null); }
public Object compose(Map<Path,Object> simpleObjects) { if (simpleObjects == null) { throw new IllegalArgumentException("simpleObject is null"); } if (simpleObjects.isEmpty()) { return Collections.emptyMap(); } if (simpleObjects.size() == 1 && simpleObjects.keySet().iterator().next().size() == 0) { return simpleObjects.values().iterator().next(); } return transformLists(composeMap(simpleObjects)); }
Composer { public Object compose(Map<Path,Object> simpleObjects) { if (simpleObjects == null) { throw new IllegalArgumentException("simpleObject is null"); } if (simpleObjects.isEmpty()) { return Collections.emptyMap(); } if (simpleObjects.size() == 1 && simpleObjects.keySet().iterator().next().size() == 0) { return simpleObjects.values().iterator().next(); } return transformLists(composeMap(simpleObjects)); } }
Composer { public Object compose(Map<Path,Object> simpleObjects) { if (simpleObjects == null) { throw new IllegalArgumentException("simpleObject is null"); } if (simpleObjects.isEmpty()) { return Collections.emptyMap(); } if (simpleObjects.size() == 1 && simpleObjects.keySet().iterator().next().size() == 0) { return simpleObjects.values().iterator().next(); } return transformLists(composeMap(simpleObjects)); } private  Composer(); }
Composer { public Object compose(Map<Path,Object> simpleObjects) { if (simpleObjects == null) { throw new IllegalArgumentException("simpleObject is null"); } if (simpleObjects.isEmpty()) { return Collections.emptyMap(); } if (simpleObjects.size() == 1 && simpleObjects.keySet().iterator().next().size() == 0) { return simpleObjects.values().iterator().next(); } return transformLists(composeMap(simpleObjects)); } private  Composer(); static Composer get(); Object compose(Map<Path,Object> simpleObjects); }
Composer { public Object compose(Map<Path,Object> simpleObjects) { if (simpleObjects == null) { throw new IllegalArgumentException("simpleObject is null"); } if (simpleObjects.isEmpty()) { return Collections.emptyMap(); } if (simpleObjects.size() == 1 && simpleObjects.keySet().iterator().next().size() == 0) { return simpleObjects.values().iterator().next(); } return transformLists(composeMap(simpleObjects)); } private  Composer(); static Composer get(); Object compose(Map<Path,Object> simpleObjects);  }