public void testCloning() {
        PinNeedle n1 = new PinNeedle();
        PinNeedle n2 = null;
        try {
            n2 = (PinNeedle) n1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
            System.err.println("Failed to clone.");
        }
        assertTrue(n1 != n2);
        assertTrue(n1.getClass() == n2.getClass());
        assertTrue(n1.equals(n2));