*/
@Test
public void testEquals()
{
final Asset asset = new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", "T");
assertTrue(asset.equals(asset));
assertTrue(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", "T")));
assertFalse(asset.equals(null));
assertFalse(asset.equals("something"));
assertFalse(asset.equals(new Asset(2, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", "T")));
assertFalse(asset.equals(new Asset(1, 3, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(3, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.Y_UP,
new GeographicLocation(1, 2, 3), "R", "S", "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(2, 2, 3), "R", "S", "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R2", "S", "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S2", "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", "T2")));
assertFalse(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
null, "R", "S", "T").equals(asset));
assertFalse(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), null, "S", "T").equals(asset));
assertFalse(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", null, "T").equals(asset));
assertFalse(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", null).equals(asset));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
null, "R", "S", "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), null, "S", "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", null, "T")));
assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", null)));
assertTrue(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
null, "R", "S", "T").equals(new Asset(1,
2, new Unit(2, "m"), UpAxis.X_UP, null, "R", "S", "T")));
assertTrue(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), null, "S", "T").equals(new Asset(
1,
2, new Unit(2, "m"), UpAxis.X_UP, new GeographicLocation(1, 2, 3),
null, "S", "T")));
assertTrue(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", null, "T").equals(new Asset(
1,
2, new Unit(2, "m"), UpAxis.X_UP, new GeographicLocation(1, 2, 3),
"R", null, "T")));
assertTrue(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", null).equals(new Asset(
1,
2, new Unit(2, "m"), UpAxis.X_UP, new GeographicLocation(1, 2, 3),
"R", "S", null)));
final Asset asset2 = new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
new GeographicLocation(1, 2, 3), "R", "S", "T");
assertTrue(asset.equals(asset2));
asset2.getContributors().add(new Contributor());
assertFalse(asset.equals(asset2));
asset2.getContributors().clear();
assertTrue(asset.equals(asset2));
asset2.getKeywords().add("KEYWORD");
assertFalse(asset.equals(asset2));
asset2.getKeywords().clear();
assertTrue(asset.equals(asset2));
}