### Question:
Field implements IField { public static Field createFromState(int state) { return new Field(state); } Field(); private  Field(int state); @Override void addListener(IFieldListener listener); @Override boolean isBomb(); @Override boolean isFlagged(); @Override boolean isOpen(); @Override boolean isExploded(); @Override void removeListener(final IFieldListener listener); @Override boolean isTouched(); void setFlagged(final boolean value); int getState(); static Field createFromState(int state); @Override int getNeighborBombs(); @Override int getImage(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testCreateFromState() { Field field = Field.createFromState(BOMB_STATE | FLAGGED_STATE); assertTrue(field.isBomb()); assertTrue(field.isFlagged()); }