SimpleCellFactory implements CellFactory<SimpleCell> { @Override public SimpleCell create(int x, int y) { return new SimpleCell(x, y, SimpleCell.STATE_DEAD); }  @Override SimpleCell create(int x, int y); @Override int[] flatten(SimpleCell cell); @Override SimpleCell inflate(int[] flattened);  }
@Test public void testCellIsOfCorrectClass() { Cell cell = factory.create(0, 0); assertThat(cell.getClass().equals(SimpleCell.class)).isTrue(); }
@Test public void testCreatedCellsAreDeadByDefault() { SimpleCell cell = factory.create(0, 0); assertThat(cell.isDead()).isTrue(); }