WeddingCake extends Cake { public void setTiers(int tiersIn) { this.tiers = tiersIn; } WeddingCake(String nameIn, String flavorIn, int quantityIn,
                   int layersIn, int tiersIn, String ... ingredientsIn); int getTiers(); void setTiers(int tiersIn); double price(); static final double BASE_RATE; }
@Test public void setTiersTest() { c1.setTiers(4); int result1 = c1.getTiers(); Assert.assertEquals("", 4, result1); c2.setTiers(1); int result2 = c2.getTiers(); Assert.assertFalse("", 0 == result2); c3.setTiers(3); int result3 = c3.getTiers(); Assert.assertTrue("", 3 == result3); }
@Test public void setTiersTest() { c1.setLayers(4); int result1 = c1.getLayers(); Assert.assertEquals("", 4, result1); c2.setLayers(1); int result2 = c2.getLayers(); Assert.assertFalse("", 0 == result2); c3.setLayers(3); int result3 = c3.getLayers(); Assert.assertTrue("", 3 == result3); }