/** Checking that attributes are preserved. */
@Test
public final void testVertexClone2()
{
Configuration conf = Configuration.getDefaultConfiguration();conf.setAllowedToCloneNonCmpVertex(true);
DirectedSparseVertex vertex = new DirectedSparseVertex();vertex.addUserDatum(JUConstants.LABEL, "name", UserData.SHARED);
vertex.addUserDatum(JUConstants.HIGHLIGHT, 1, UserData.SHARED);
vertex.addUserDatum(JUConstants.COLOUR, JUConstants.BLUE, UserData.SHARED);
vertex.addUserDatum(JUConstants.ACCEPTED, false, UserData.SHARED);
CmpVertex result = LearnerGraph.cloneCmpVertex(vertex, conf);
Assert.assertEquals("name", result.getID().toString());
Assert.assertEquals(JUConstants.BLUE, result.getColour());
Assert.assertFalse(result.isAccept());Assert.assertTrue(result.isHighlight());
vertex.removeUserDatum(JUConstants.ACCEPTED);vertex.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);
Assert.assertFalse(result.isAccept());
}