### Question:
NodeDataRequest { public static CodeNodeDataRequest createCodeRequest(final Hash hash) { return new CodeNodeDataRequest(hash); } protected  NodeDataRequest(final RequestType requestType, final Hash hash); static AccountTrieNodeDataRequest createAccountDataRequest(final Hash hash); static StorageTrieNodeDataRequest createStorageDataRequest(final Hash hash); static CodeNodeDataRequest createCodeRequest(final Hash hash); static Bytes serialize(final NodeDataRequest request); static NodeDataRequest deserialize(final Bytes encoded); RequestType getRequestType(); Hash getHash(); Bytes getData(); NodeDataRequest setData(final Bytes data); NodeDataRequest setRequiresPersisting(final boolean requiresPersisting); final void persist(final WorldStateStorage.Updater updater); abstract Stream<NodeDataRequest> getChildRequests(); abstract Optional<Bytes> getExistingData(final WorldStateStorage worldStateStorage);  }### Answer:
@Test public void serializesCodeRequests() { BlockDataGenerator gen = new BlockDataGenerator(0); CodeNodeDataRequest request = NodeDataRequest.createCodeRequest(gen.hash()); NodeDataRequest sedeRequest = serializeThenDeserialize(request); assertRequestsEquals(sedeRequest, request); assertThat(sedeRequest).isInstanceOf(CodeNodeDataRequest.class); }