### Question:
LotoGrid implements LotoGridInterface, LotoGridGUIListener { @Override public void clear() { if (!this.gridHistory.peek().getValue0().isEmpty()) { Grid newGrid = new Grid(); this.gridHistory.push(Pair.with(newGrid, null)); save(); fireUpdate(); } } LotoGrid(int historyDepth, int maxNumber, String profileName);  LotoGrid(int historyDepth, int maxNumber); @Override void clic(int number); @Override void clear(); @Override void undo(); void save(); void fireUpdate(); Set<LotoGridListener> getListeners(); @Override void onClic(int number);  }### Answer:
@Test public void testClear() { LotoGrid grid = new LotoGrid(HISTORY_DEPTH, MAX_NUMBER); for (int i = 1; i <= MAX_NUMBER; i++) { grid.clic(i); } grid.clear(); assertThat(grid.getActualGrid().isEmpty()).isTrue(); }