ReadData extends AbstractRead<Optional<NormalizedNode<?, ?>>> { public static ReadData fromSerializable(final Object serializable) { Preconditions.checkArgument(serializable instanceof ReadData); return (ReadData)serializable; } ReadData();  ReadData(final YangInstanceIdentifier path, short version); @Override FluentFuture<Optional<NormalizedNode<?, ?>>> apply(DOMStoreReadTransaction readDelegate); @Override void processResponse(Object readResponse, SettableFuture<Optional<NormalizedNode<?, ?>>> returnFuture); static ReadData fromSerializable(final Object serializable); static boolean isSerializedType(Object message);  }
@Test public void testSerialization() { ReadData expected = new ReadData(TestModel.TEST_PATH, DataStoreVersions.CURRENT_VERSION); Object serialized = expected.toSerializable(); assertEquals("Serialized type", ReadData.class, serialized.getClass()); ReadData actual = ReadData.fromSerializable(SerializationUtils.clone((Serializable) serialized)); assertEquals("getPath", expected.getPath(), actual.getPath()); assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); }