/******************************************************************************************************************* * * {@inheritDoc} * ******************************************************************************************************************/ @Override @Nonnull public Function<List<PresentationModel>, PresentationModel> finisher() { return childrenPms -> { final List<Object> temp = new ArrayList<>(roles); temp.add(new ArrayListSimpleComposite<>(childrenPms)); // FIXME: "" triggers a NPE in RoleManagerSupport.java:341 return new DefaultPresentationModel("", temp.toArray()); }; }
@Test public void must_produce_valid_Finders() { final ArrayListSimpleComposite<String> underTest = new ArrayListSimpleComposite<>(data); final Finder<String> finder1 = underTest.findChildren(); final Finder<String> finder2 = finder1.from(3).max(1); assertThat((List<String>)finder1.results(), is(data)); assertThat((List<String>)finder2.results(), is(Arrays.asList("4"))); } }
@Nonnull public MockDatum withChildren (final @Nonnull List<MockDatum> children) { composite = new ArrayListSimpleComposite<>(this.children = children); return this; }