@Test
public void testEquals()
    throws Exception
{

    Artifact artifact = new DefaultArtifact( "gid", "aid", "ext", "cla", "ver" );
    assertTrue( artifact.equals( artifact ) );
    assertFalse( artifact.equals( null ) );
    assertFalse( artifact.equals( 42 ) );
    Artifact artifact0 = new DefaultArtifact( "gid:aid:ext:cla:ver" );
    assertTrue( artifact.equals( artifact0 ) );
    Artifact artifact1 = new DefaultArtifact( "gidX", "aid", "ext", "cla", "ver" );
    Artifact artifact2 = new DefaultArtifact( "gid", "aidX", "ext", "cla", "ver" );
    Artifact artifact3 = new DefaultArtifact( "gid", "aid", "extX", "cla", "ver" );
    Artifact artifact4 = new DefaultArtifact( "gid", "aid", "ext", "claX", "ver" );
    Artifact artifact5 = new DefaultArtifact( "gid", "aid", "ext", "cla", "verX" );
    assertFalse( artifact.equals( artifact1 ) );
    assertFalse( artifact.equals( artifact2 ) );
    assertFalse( artifact.equals( artifact3 ) );
    assertFalse( artifact.equals( artifact4 ) );
    assertFalse( artifact.equals( artifact5 ) );
}