SpriteSheet { public int numberOfImages() { return height * width; } SpriteSheet(Image spriteSheet, int width, int height, int duration);  SpriteSheet(int width, int height, Image spriteSheet, int imageWidth,
                       int imageHeight, int duration); static SpriteSheet CreateSpriteSheetFromTileRegister(String tileName, int width, int height, int duration); Point getPointForIndex(int imageIndex); void setImageHeight(int imageHeight); void setImageWidth(int imageWidth); int getWidth(); int getHeight(); int numberOfImages(); Image getSpriteSheet(); int getDuration(); int getImageHeight(); int getImageWidth();  }
@Test public void testNumberOfImages() throws Exception { SpriteSheet spriteSheet = new SpriteSheet(null, 1, 1, 100); assertEquals(1, spriteSheet.numberOfImages()); spriteSheet = new SpriteSheet(null, 1, 2, 100); assertEquals(2, spriteSheet.numberOfImages()); spriteSheet = new SpriteSheet(null, 2, 1, 100); assertEquals(2, spriteSheet.numberOfImages()); spriteSheet = new SpriteSheet(null, 3, 3, 100); assertEquals(9, spriteSheet.numberOfImages()); }