### Question:
MaxCount implements Shape { public static MaxCount maxCount(final int limit) { return new MaxCount(limit); } private  MaxCount(final int limit); static MaxCount maxCount(final int limit); static Optional<Integer> maxCount(final Shape shape); int getLimit(); @Override T map(final Probe<T> probe); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void testInspectConjunction() { final MaxCount x=maxCount(10); final MaxCount y=maxCount(100); assertThat(maxCount(and(x, y))) .contains(10); assertThat(maxCount(and(x, and()))) .contains(10); assertThat(maxCount(and(and(), and()))) .isEmpty(); }
@Test void testInspectDisjunction() { final MaxCount x=maxCount(10); final MaxCount y=maxCount(100); assertThat(maxCount(or(x, y))) .contains(100); assertThat(maxCount(or(x, and()))) .contains(10); assertThat(maxCount(or(and(), and()))) .isEmpty(); }
@Test void testOption() { final MaxCount x=maxCount(10); final MaxCount y=maxCount(100); assertThat(maxCount(when(and(), x, y))) .contains(100); assertThat(maxCount(when(and(), x, and()))) .contains(10); assertThat(maxCount(when(and(), and(), and()))) .isEmpty(); }
@Test void testInspectOtherShape() { assertThat(maxCount(and())) .isEmpty(); }