Board implements IBoard { @Override public int getFlagCount() { int counter = 0; for (Field field : itsFields) if (field.isFlagged()) counter++; return counter; } Board(final int dimX, final int dimY); private  Board(final BoardState state); @Override IField getField(final int x, final int y); @Override Point getDimension(); @Override int getFlagCount(); @Override int getOpenCount(); void openAllFlaggedOrBomb(); @Override String toString(); @Override Point getPosition(final IField field); @Override boolean isOverflagged(); boolean isExploded(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testGetFlagCount() { flag(0, 0); assertEquals(1, itsBoard.getFlagCount()); }