### Question:
GlassImpl implements Glass { public void empty() { for (int i = 0; i < occupied.size(); i++) { occupied.set(i, BigInteger.ZERO); } if (listener != null) { listener.event(Events.glassOverflown(getLevel.get())); } } GlassImpl(int width, int height, Supplier<Integer> supplier); boolean accept(Figure figure, int x, int y); void drop(Figure figure, int x, int y); void empty(); @Override void figureAt(Figure figure, int x, int y); @Override List<Plot> dropped(); @Override List<Plot> currentFigure(); @Override boolean isEmpty(); @Override void setListener(EventListener listener); @Override Glass clone(); static final int BITS; static final BigInteger Ob111; }### Answer:
@Test public void shouldTriggerListenerWhenOverflow() { glass.empty(); verify(listener).event(Events.glassOverflown(1)); }
@Test public void shouldTriggerAllListenersWhenOverflow() { glass.empty(); verify(listener).event(Events.glassOverflown(1)); }