assertThat(create().getValue(null), is(Long.valueOf(0)));
}
@Test
public void getValueShouldReturnTheSumOfTheChildrenValueForAParentPath() {
TreePath leaf1 = new TreePath(new Object[]{"1", "2", "3"});
TreePath leaf2 = new TreePath(new Object[]{"1", "2", "4"});
TreePath leaf3 = new TreePath(new Object[]{"1", "5", "6"});
TreePath parentOf1n2 = new TreePath(new Object[]{"1", "2"});
TreePath parentOfAll = new TreePath(new Object[]{"1"});
@SuppressWarnings("unchecked")
IConverter<TreePath> converter = mock(IConverter.class);
given(converter.convert(leaf1)).willReturn(Long.valueOf(1));
given(converter.convert(leaf2)).willReturn(Long.valueOf(2));