AbstractCellularAutomaton implements CellularAutomaton<T> { @Override public void reset() { Grid<T> grid = getCurrentState(); T newBornCell = getFactory().create(0, 0); for (int j = 0; j < gridSizeY; j++) { for (int i = 0; i < gridSizeX; i++) { grid.getCell(i, j).reset(newBornCell.getState()); } } } AbstractCellularAutomaton(int gridSizeX, int gridSizeY); protected  AbstractCellularAutomaton(Parcel in); @Override void setRule(Rule<T> rule); @Override Rule<T> getRule(); @Override final int getSizeX(); @Override final int getSizeY(); @Override void reset(); @Override int getDefaultCellState(); @Override void randomFill(Fill fill); @Override void step(int count); @Override void step(); @Override final Grid<T> getCurrentState(); @Override @DebugLog void setState(Grid<T> grid); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); @Override void paint(int x, int y, int state);  }
@Test public void testReset() { Grid<GrowableCell> emptyGrid = automaton.getGridHandler().createNew(); automaton.putCell(new GrowableCell(0, 0, Cell.STATE_ALIVE)); automaton.reset(); assertThat(automaton.getCurrentState()).isEqualTo(emptyGrid); }