private static boolean testTriangle() {
    boolean pass = true;
    int test = 1;
    Triangle tri;
    Point a = new Point(4, 0);
    Point b = new Point(-2, -1);
    Point c = new Point(1, 4);

    System.out.println("Triangle tests...");

    tri = new Triangle(a, b, c, Color.cyan, false);
    pass &= test(approx(tri.getArea(), 13.5, 0.000001), test++);
    pass &= test(tri.getColor().equals(Color.cyan), test++);

    tri.setColor(Color.black);
    pass &= test(tri.getColor().equals(Color.black), test++);
    pass &= test(!tri.getFilled(), test++);

    tri.setFilled(true);
    pass &= test(tri.getFilled(), test++);
    pass &= test(tri.getVertexA().equals(new Point(4, 0)), test++);
    pass &= test(tri.getVertexB().equals(new Point(-2, -1)), test++);
    pass &= test(tri.getVertexC().equals(new Point(1, 4)), test++);

    a = new Point(7, -3);
    tri.setVertexA(a);
    pass &= test(tri.getVertexA().equals(new Point(7, -3)), test++);

    b = new Point(13, 56);
    tri.setVertexB(b);
    pass &= test(tri.getVertexB().equals(new Point(13, 56)), test++);

    c = new Point(-3, 23);
    tri.setVertexC(c);
    pass &= test(tri.getVertexC().equals(new Point(-3, 23)), test++);
    pass &= test(approx(tri.getArea(), 373.0, 0.000001), test++);

    tri.move(new Point(-5, -7));
    pass &= test(tri.getVertexA().equals(new Point(2, -10)), test++);
    pass &= test(tri.getVertexB().equals(new Point(8, 49)), test++);
    pass &= test(tri.getVertexC().equals(new Point(-8, 16)), test++);

    a = new Point(2, -10);
    b = new Point(8, 49);
    c = new Point(-8, 16);

    Triangle tri2 = new Triangle(a, b, c, Color.black, true);
    pass &= test(tri.equals(tri2), test++);

    Triangle tri3 = new Triangle(new Point(3, -9), b, c, Color.black, false);
    pass &= test(!tri2.equals(tri3), test++);

    tri3 = new Triangle(a, new Point(7, 48), c, Color.black, false);
    pass &= test(!tri2.equals(tri3), test++);

    tri3 = new Triangle(a, b, new Point(-7, 17), Color.black, false);
    pass &= test(!tri2.equals(tri3), test++);

    tri3 = new Triangle(a, b, c, Color.red, false);
    pass &= test(!tri2.equals(tri3), test++);

    pass &= test(!tri2.equals(null), test++);
    pass &= test(!tri2.equals(new String("Whatever")), test++);

    return pass;
  }