Tile extends Observable implements Drawable, Tickable { public void decreaseWaterLevel() { if(!adjacentToWater()){ if (waterLevel > WATER_DECREASE) { waterLevel -= WATER_DECREASE; } else { waterLevel = (float) 0.0; } } } Tile(int x, int y, int tileType); @Override double getWorldX(); @Override double getWorldY(); double getWidth(); double getHeight(); void draw(Viewport v, GraphicsContext g); void setTileType(int tileType); void clearProperties(); void setProperty(TileProperty prop, Object value); Boolean hasProperty(TileProperty prop); Object getProperty(TileProperty prop); void removeProperty(TileProperty prop); int getTileType(); TileEntity getTileEntity(); void setTileEntity(TileEntity tileEntity); @Override void tick(); float getWaterLevel(); void increaseWaterLevel(); void setWaterLevel(float newLevel); void decreaseWaterLevel(); void handleObservers(); double getPollution(); void setPollution(double pollution); boolean getSafeZone(); void setSafeZone(boolean safe); void setActiveSeason(String season); String getActiveSeason(); boolean adjacentToWater();  }
@Test public void testDecreaseWaterLevel() { tile.increaseWaterLevel(); tile.decreaseWaterLevel(); assertTrue(tile.getWaterLevel() < 1); for (int i = 0; i < 1000; i++) { tile.decreaseWaterLevel(); } assertTrue(0.0 == tile.getWaterLevel()); }