CodeSystem extends AbstractNode { public static Builder getBuilder(String codeSystemOId, String code, String name, String userName) { return new Builder(codeSystemOId, code, name, userName); } CodeSystem(); static Builder getBuilder(String codeSystemOId, String code,
			String name, String userName); void update(String codeSystemOId, String code, String name,
			String displayName, String userName); Long getId(); void setId(Long id); String getCodeSystemOId(); void setCodeSystemOId(String codeSystemOId); String getDisplayName(); void setDisplayName(String displayName); List<CodeSystemVersion> getCodeSystemVersions(); void setCodeSystemVersions(List<CodeSystemVersion> codeSystemVersions); @Override String toString();  }
@Test public void testPrePersist() { CodeSystem codeSystem = CodeSystem.getBuilder(CODESYSTEM_OID, CODESYSTEM_CODE, CODESYSTEM_NAME, CODESYSTEM_USERNAME).build(); codeSystem.prePersist(); Date creationTime = codeSystem.getCreationTime(); Date modificationTime = codeSystem.getModificationTime(); assertNotNull(creationTime); assertNotNull(modificationTime); assertEquals(creationTime, modificationTime); }
@Test public void testPreUpdate() { CodeSystem codeSystem = CodeSystem.getBuilder(CODESYSTEM_OID, CODESYSTEM_CODE, CODESYSTEM_NAME, CODESYSTEM_USERNAME).build(); codeSystem.prePersist(); try { Thread.sleep(1000); } catch (InterruptedException e) { } codeSystem.preUpdate(); Date creationTime = codeSystem.getCreationTime(); Date modificationTime = codeSystem.getModificationTime(); assertNotNull(creationTime); assertNotNull(modificationTime); assertTrue(modificationTime.after(creationTime)); }