/** Checking that attributes which are cleared are not added to a Jung vertex. */
@Test
public final void testVertexConstruction()
{
Configuration conf = Configuration.getDefaultConfiguration().copy();conf.setAllowedToCloneNonCmpVertex(true);
DeterministicVertex vertex = new DeterministicVertex("testVertex");
vertex.setAccept(false);vertex.setHighlight(true);vertex.setColour(JUConstants.AMBER);vertex.setOrigState(VertexID.parseID("id"));vertex.setDepth(34);
Assert.assertTrue(vertex.containsUserDatumKey(JUConstants.LABEL));
Assert.assertTrue(vertex.containsUserDatumKey(JUConstants.ACCEPTED));
Assert.assertTrue(vertex.containsUserDatumKey(JUConstants.HIGHLIGHT));
Assert.assertTrue(vertex.containsUserDatumKey(JUConstants.COLOUR));
Assert.assertTrue(vertex.containsUserDatumKey(JUConstants.ORIGSTATE));
Assert.assertTrue(vertex.containsUserDatumKey(JUConstants.DEPTH));
vertex.setAccept(true);vertex.setHighlight(false);vertex.setColour(null);vertex.setOrigState(null);vertex.setDepth(JUConstants.intUNKNOWN);
Assert.assertTrue(vertex.containsUserDatumKey(JUConstants.LABEL));
Assert.assertTrue(vertex.containsUserDatumKey(JUConstants.ACCEPTED));
Assert.assertFalse(vertex.containsUserDatumKey(JUConstants.HIGHLIGHT));
Assert.assertFalse(vertex.containsUserDatumKey(JUConstants.COLOUR));
Assert.assertFalse(vertex.containsUserDatumKey(JUConstants.ORIGSTATE));
Assert.assertFalse(vertex.containsUserDatumKey(JUConstants.DEPTH));
}