### Question:
BatchDescription { public Collection<Work> getWorks() { return new ArrayList<>(works.values()); }  final void start(); Collection<Work> getWorks(); @Override String toString();  }### Answer:
@Test public void simple() { Collection<Work> works = exec(new SimpleBatch()).getWorks(); assertThat(works.size(), is(1)); assertThat(dependencies(works, JobFlow1.class), isJust()); }
@Test public void list() { Collection<Work> works = exec(new ListBatch()).getWorks(); assertThat(works.size(), is(3)); assertThat(dependencies(works, JobFlow1.class), isJust()); assertThat(dependencies(works, JobFlow2.class), isJust(JobFlow1.class)); assertThat(dependencies(works, JobFlow3.class), isJust(JobFlow2.class)); }
@Test public void graph() { Collection<Work> works = exec(new GraphBatch()).getWorks(); assertThat(works.size(), is(4)); assertThat(dependencies(works, JobFlow1.class), isJust()); assertThat(dependencies(works, JobFlow2.class), isJust(JobFlow1.class)); assertThat(dependencies(works, JobFlow3.class), isJust(JobFlow1.class)); assertThat(dependencies(works, JobFlow4.class), isJust(JobFlow2.class, JobFlow3.class)); }