}
@Test
public void draw() {
Diamond bodyPart;
Painter painter;
bodyPart = diamond1();
painter = painterMock();
painter.graphics = gMock();
bodyPart.draw(painter);
double[] xCoordinates = {0.5, 1, 0.5, 0};
double[] yCoordinates = {0, 0.5, 1, 0.5};
verify(painter).fillPolygon(xCoordinates, yCoordinates);
for (int i = 0; i <= 2; i++) {
verify(painter).drawLine(xCoordinates[i], yCoordinates[i], xCoordinates[i+1], yCoordinates[i+1]);
}
bodyPart = diamond2();
painter = painterMock();
painter.graphics = gMock();
bodyPart.draw(painter);
xCoordinates = new double[] {7.5, 8, 7.5, 7};
yCoordinates = new double[] {2, 2.5, 3, 2.5};
verify(painter).fillPolygon(xCoordinates, yCoordinates);
for (int i = 0; i <= 2; i++) {