@Test(expected=NullPointerException.class) public void deserializeTest_missingName() { final Document doc = new Document(TIMESTAMP_KEY, TEST_TIMESTAMP); adapter.deserialize(doc); }
public MergeParentMetadata deserialize(final Document doc) { final Date timestamp = (Date) doc.get(TIMESTAMP_KEY); final String ryaInstance = (String) doc.get(RYANAME_KEY); final Date filterTimestamp = (Date) doc.get(FILTER_TIMESTAMP_KEY); final Long offset = (Long) doc.get(PARENT_TIME_OFFSET_KEY); return new MergeParentMetadata.Builder() .setRyaInstanceName(ryaInstance) .setTimestamp(timestamp) .setFilterTimestmap(filterTimestamp) .setParentTimeOffset(offset) .build(); }
ParentMetadataRepositoryAdapter { public MergeParentMetadata deserialize(final Document doc) { final Date timestamp = (Date) doc.get(TIMESTAMP_KEY); final String ryaInstance = (String) doc.get(RYANAME_KEY); final Date filterTimestamp = (Date) doc.get(FILTER_TIMESTAMP_KEY); final Long offset = (Long) doc.get(PARENT_TIME_OFFSET_KEY); return new MergeParentMetadata.Builder() .setRyaInstanceName(ryaInstance) .setTimestamp(timestamp) .setFilterTimestmap(filterTimestamp) .setParentTimeOffset(offset) .build(); } }
ParentMetadataRepositoryAdapter { public MergeParentMetadata deserialize(final Document doc) { final Date timestamp = (Date) doc.get(TIMESTAMP_KEY); final String ryaInstance = (String) doc.get(RYANAME_KEY); final Date filterTimestamp = (Date) doc.get(FILTER_TIMESTAMP_KEY); final Long offset = (Long) doc.get(PARENT_TIME_OFFSET_KEY); return new MergeParentMetadata.Builder() .setRyaInstanceName(ryaInstance) .setTimestamp(timestamp) .setFilterTimestmap(filterTimestamp) .setParentTimeOffset(offset) .build(); }  }
ParentMetadataRepositoryAdapter { public MergeParentMetadata deserialize(final Document doc) { final Date timestamp = (Date) doc.get(TIMESTAMP_KEY); final String ryaInstance = (String) doc.get(RYANAME_KEY); final Date filterTimestamp = (Date) doc.get(FILTER_TIMESTAMP_KEY); final Long offset = (Long) doc.get(PARENT_TIME_OFFSET_KEY); return new MergeParentMetadata.Builder() .setRyaInstanceName(ryaInstance) .setTimestamp(timestamp) .setFilterTimestmap(filterTimestamp) .setParentTimeOffset(offset) .build(); }  Document serialize(final MergeParentMetadata metadata); MergeParentMetadata deserialize(final Document doc); }
ParentMetadataRepositoryAdapter { public MergeParentMetadata deserialize(final Document doc) { final Date timestamp = (Date) doc.get(TIMESTAMP_KEY); final String ryaInstance = (String) doc.get(RYANAME_KEY); final Date filterTimestamp = (Date) doc.get(FILTER_TIMESTAMP_KEY); final Long offset = (Long) doc.get(PARENT_TIME_OFFSET_KEY); return new MergeParentMetadata.Builder() .setRyaInstanceName(ryaInstance) .setTimestamp(timestamp) .setFilterTimestmap(filterTimestamp) .setParentTimeOffset(offset) .build(); }  Document serialize(final MergeParentMetadata metadata); MergeParentMetadata deserialize(final Document doc); static final String RYANAME_KEY; static final String TIMESTAMP_KEY; static final String FILTER_TIMESTAMP_KEY; static final String PARENT_TIME_OFFSET_KEY; }