### Question:
ReferencedEntityDeclarationPersistence { public static ReferencedEntityDeclaration toData( final CdmReferencedEntityDeclarationDefinition instance, final ResolveOptions resOpt, final CopyOptions options) { final ReferencedEntityDeclaration result = new ReferencedEntityDeclaration(); result.setType(EntityDeclaration.EntityDeclarationDefinitionType.ReferencedEntity); result.setLastFileStatusCheckTime(TimeUtils.formatDateStringIfNotNull(instance.getLastFileStatusCheckTime())); result.setLastFileModifiedTime(TimeUtils.formatDateStringIfNotNull(instance.getLastFileModifiedTime())); result.setExplanation(instance.getExplanation()); result.setEntityName(instance.getEntityName()); result.setEntityPath(instance.getEntityPath()); result.setExhibitsTraits(Utils.listCopyDataAsArrayNode(instance.getExhibitsTraits(), resOpt, options)); return result; }  static CdmEntityDeclarationDefinition fromData(
      final CdmCorpusContext ctx,
      final String prefixPath,
      final JsonNode obj); static ReferencedEntityDeclaration toData(
      final CdmReferencedEntityDeclarationDefinition instance,
      final ResolveOptions resOpt,
      final CopyOptions options);  }### Answer:
@Test public void toData_expectResultHasProperFields() { final CdmReferencedEntityDeclarationDefinition instance = new CdmReferencedEntityDeclarationDefinition(null, null); instance.setEntityName("ENTITY_NAME"); instance.setExplanation("EXPLANATION"); instance.setLastFileStatusCheckTime(OffsetDateTime.parse("2019-01-01T00:00:00Z")); instance.setLastFileModifiedTime(OffsetDateTime.parse("2019-01-01T00:00:00Z")); instance.setEntityPath("ENTITY_PATH"); final ReferencedEntityDeclaration result = ReferencedEntityDeclarationPersistence.toData(instance, null, null); AssertJUnit.assertEquals("ReferencedEntity", result.getType()); AssertJUnit.assertEquals("ENTITY_NAME", result.getEntityName()); AssertJUnit.assertEquals("EXPLANATION", result.getExplanation()); AssertJUnit.assertEquals("2019-01-01T00:00:00Z", result.getLastFileStatusCheckTime()); AssertJUnit.assertEquals("2019-01-01T00:00:00Z", result.getLastFileModifiedTime()); AssertJUnit.assertEquals("ENTITY_PATH", result.getEntityPath()); }