@Test
public void testSerialization() {

    NormalizedNode<?, ?> expectedNode = ImmutableContainerNodeBuilder.create()
            .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME))
            .withChild(ImmutableNodes.leafNode(TestModel.DESC_QNAME, "foo")).build();
    ShardSnapshotState expected = new ShardSnapshotState(new MetadataShardDataTreeSnapshot(expectedNode));
    ShardSnapshotState cloned = (ShardSnapshotState) SerializationUtils.clone(expected);
    assertNotNull("getSnapshot is null", cloned.getSnapshot());
    assertEquals("getSnapshot type", MetadataShardDataTreeSnapshot.class, cloned.getSnapshot().getClass());
    assertEquals("getRootNode", expectedNode,
            ((MetadataShardDataTreeSnapshot)cloned.getSnapshot()).getRootNode().get());
}