Commit 2ac124f3 authored by ethiraj krishnamanaidu's avatar ethiraj krishnamanaidu
Browse files

Merge branch 'mapping-info-fix-datatype' into 'master'

Fix mapping info datatype

See merge request !39
parents a56a8e23 3557f585
Pipeline #30701 failed with stages
in 33 minutes and 16 seconds
{ {
"id": "1a3c1f16-25c7-44cf-9fbd-7d9cbc90805a", "id": "1a3c1f16-25c7-44cf-9fbd-7d9cbc90805a",
"version": "1606039291", "version": 1606039291,
"authority": "opendes", "authority": "opendes",
"kind": "opendes:mapping:mapping:1.0.0", "kind": "opendes:mapping:mapping:1.0.0",
"mappingSchemaMajorVersion": "1", "mappingSchemaMajorVersion": 1,
"mappingSchemaMinorVersion": "0", "mappingSchemaMinorVersion": 0,
"mappingSchemaPatchVersion": "0", "mappingSchemaPatchVersion": 0,
"sourceSchemaAuthority": "opendes", "sourceSchemaAuthority": "opendes",
"sourceSchemaSource": "oga", "sourceSchemaSource": "oga",
"sourceEntityType": "well", "sourceEntityType": "well",
"sourceSchemaMajorVersion": "1", "sourceSchemaMajorVersion": 1,
"sourceSchemaKind": "opendes:oga:well:1", "sourceSchemaKind": "opendes:oga:well:1",
"targetSchemaAuthority": "slb", "targetSchemaAuthority": "slb",
"targetSchemaSource": "wks", "targetSchemaSource": "wks",
"targetEntityType": "well", "targetEntityType": "well",
"targetSchemaMajorVersion": "4", "targetSchemaMajorVersion": 4,
"targetSchemaKind": "slb:wks:well:4", "targetSchemaKind": "slb:wks:well:4",
"createdBy": "automation", "createdBy": "automation",
"fileName": "1a3c1f16-25c7-44cf-9fbd-7d9cbc90805a.json", "fileName": "1a3c1f16-25c7-44cf-9fbd-7d9cbc90805a.json",
......
{ {
"id": "4b312ef2-447d-4898-9d54-2a401975bd0b", "id": "4b312ef2-447d-4898-9d54-2a401975bd0b",
"version": "1606039291", "version": 1606039291,
"authority": "opendes", "authority": "opendes",
"kind": "opendes:mapping:mapping:1.0.0", "kind": "opendes:mapping:mapping:1.0.0",
"mappingSchemaMajorVersion": "1", "mappingSchemaMajorVersion": 1,
"mappingSchemaMinorVersion": "0", "mappingSchemaMinorVersion": 0,
"mappingSchemaPatchVersion": "0", "mappingSchemaPatchVersion": 0,
"sourceSchemaAuthority": "opendes", "sourceSchemaAuthority": "opendes",
"sourceSchemaSource": "ihs", "sourceSchemaSource": "ihs",
"sourceEntityType": "log", "sourceEntityType": "log",
"sourceSchemaMajorVersion": "1", "sourceSchemaMajorVersion": 1,
"sourceSchemaKind": "opendes:ihs:log:1", "sourceSchemaKind": "opendes:ihs:log:1",
"targetSchemaAuthority": "slb", "targetSchemaAuthority": "slb",
"targetSchemaSource": "wks", "targetSchemaSource": "wks",
"targetEntityType": "log", "targetEntityType": "log",
"targetSchemaMajorVersion": "2", "targetSchemaMajorVersion": 2,
"targetSchemaKind": "slb:wks:log:2", "targetSchemaKind": "slb:wks:log:2",
"createdBy": "automation", "createdBy": "automation",
"fileName": "4b312ef2-447d-4898-9d54-2a401975bd0b.json", "fileName": "4b312ef2-447d-4898-9d54-2a401975bd0b.json",
......
{ {
"id": "aa0ee7f6-2c0b-474a-962c-3e837a3b7de3", "id": "aa0ee7f6-2c0b-474a-962c-3e837a3b7de3",
"version": "1606039291", "version": 1606039291,
"authority": "opendes", "authority": "opendes",
"kind": "opendes:mapping:mapping:1.0.0", "kind": "opendes:mapping:mapping:1.0.0",
"mappingSchemaMajorVersion": "1", "mappingSchemaMajorVersion": 1,
"mappingSchemaMinorVersion": "0", "mappingSchemaMinorVersion": 0,
"mappingSchemaPatchVersion": "0", "mappingSchemaPatchVersion": 0,
"sourceSchemaAuthority": "opendes", "sourceSchemaAuthority": "opendes",
"sourceSchemaSource": "oga", "sourceSchemaSource": "oga",
"sourceEntityType": "well", "sourceEntityType": "well",
"sourceSchemaMajorVersion": "1", "sourceSchemaMajorVersion": 1,
"sourceSchemaKind": "opendes:oga:well:1", "sourceSchemaKind": "opendes:oga:well:1",
"targetSchemaAuthority": "abc", "targetSchemaAuthority": "abc",
"targetSchemaSource": "wks", "targetSchemaSource": "wks",
"targetEntityType": "well", "targetEntityType": "well",
"targetSchemaMajorVersion": "1", "targetSchemaMajorVersion": 1,
"targetSchemaKind": "abc:wks:well:1", "targetSchemaKind": "abc:wks:well:1",
"createdBy": "automation", "createdBy": "automation",
"fileName": "aa0ee7f6-2c0b-474a-962c-3e837a3b7de3.json", "fileName": "aa0ee7f6-2c0b-474a-962c-3e837a3b7de3.json",
......
{ {
"id": "d61a36bc-7b7b-4e7c-8a9c-33e7315bc076", "id": "d61a36bc-7b7b-4e7c-8a9c-33e7315bc076",
"version": "1606039291", "version": 1606039291,
"authority": "opendes", "authority": "opendes",
"kind": "opendes:mapping:mapping:1.0.0", "kind": "opendes:mapping:mapping:1.0.0",
"mappingSchemaMinorVersion": "0", "mappingSchemaMajorVersion": 1,
"mappingSchemaPatchVersion": "0", "mappingSchemaMinorVersion": 0,
"mappingSchemaPatchVersion": 0,
"sourceSchemaAuthority": "opendes", "sourceSchemaAuthority": "opendes",
"sourceSchemaSource": "ihs", "sourceSchemaSource": "ihs",
"sourceEntityType": "log", "sourceEntityType": "log",
"sourceSchemaMajorVersion": "1", "sourceSchemaMajorVersion": 1,
"sourceSchemaKind": "opendes:ihs:log:1", "sourceSchemaKind": "opendes:ihs:log:1",
"targetSchemaAuthority": "abc", "targetSchemaAuthority": "abc",
"targetSchemaSource": "wks", "targetSchemaSource": "wks",
"targetEntityType": "log", "targetEntityType": "log",
"targetSchemaMajorVersion": "3", "targetSchemaMajorVersion": 3,
"targetSchemaKind": "abc:wks:log:3", "targetSchemaKind": "abc:wks:log:3",
"createdBy": "automation", "createdBy": "automation",
"fileName": "d61a36bc-7b7b-4e7c-8a9c-33e7315bc076.json", "fileName": "d61a36bc-7b7b-4e7c-8a9c-33e7315bc076.json",
......
{ {
"id": "dda587cd-770b-4104-bae3-3f834c3a8aec", "id": "dda587cd-770b-4104-bae3-3f834c3a8aec",
"version": "1606039291", "version": 1606039291,
"authority": "opendes", "authority": "opendes",
"kind": "opendes:mapping:mapping:1.0.0", "kind": "opendes:mapping:mapping:1.0.0",
"mappingSchemaMajorVersion": "1", "mappingSchemaMajorVersion": 1,
"mappingSchemaMinorVersion": "0", "mappingSchemaMinorVersion": 0,
"mappingSchemaPatchVersion": "0", "mappingSchemaPatchVersion": 0,
"sourceSchemaAuthority": "opendes", "sourceSchemaAuthority": "opendes",
"sourceSchemaSource": "oga", "sourceSchemaSource": "oga",
"sourceEntityType": "well", "sourceEntityType": "well",
"sourceSchemaMajorVersion": "1", "sourceSchemaMajorVersion": 1,
"sourceSchemaKind": "opendes:oga:well:1", "sourceSchemaKind": "opendes:oga:well:1",
"targetSchemaAuthority": "slb", "targetSchemaAuthority": "slb",
"targetSchemaSource": "wks", "targetSchemaSource": "wks",
"targetEntityType": "well", "targetEntityType": "well",
"targetSchemaMajorVersion": "5", "targetSchemaMajorVersion": 5,
"targetSchemaKind": "slb:wks:well:5", "targetSchemaKind": "slb:wks:well:5",
"createdBy": "automation", "createdBy": "automation",
"fileName": "dda587cd-770b-4104-bae3-3f834c3a8aec.json", "fileName": "dda587cd-770b-4104-bae3-3f834c3a8aec.json",
......
{ {
"id": "e2678b5f-5917-4bb1-8b30-2006efcb720d", "id": "e2678b5f-5917-4bb1-8b30-2006efcb720d",
"version": "1606039291", "version": 1606039291,
"authority": "opendes", "authority": "opendes",
"kind": "opendes:mapping:mapping:1.0.0", "kind": "opendes:mapping:mapping:1.0.0",
"mappingSchemaMajorVersion": "1", "mappingSchemaMajorVersion": 1,
"mappingSchemaMinorVersion": "0", "mappingSchemaMinorVersion": 0,
"mappingSchemaPatchVersion": "0", "mappingSchemaPatchVersion": 0,
"sourceSchemaAuthority": "opendes", "sourceSchemaAuthority": "opendes",
"sourceSchemaSource": "at", "sourceSchemaSource": "at",
"sourceEntityType": "wellbore", "sourceEntityType": "wellbore",
"sourceSchemaMajorVersion": "1", "sourceSchemaMajorVersion": 1,
"sourceSchemaKind": "opendes:at:wellbore:1", "sourceSchemaKind": "opendes:at:wellbore:1",
"targetSchemaAuthority": "slb", "targetSchemaAuthority": "slb",
"targetSchemaSource": "wks", "targetSchemaSource": "wks",
"targetEntityType": "wellbore", "targetEntityType": "wellbore",
"targetSchemaMajorVersion": "1", "targetSchemaMajorVersion": 1,
"targetSchemaKind": "slb:wks:wellbore:1", "targetSchemaKind": "slb:wks:wellbore:1",
"createdBy": "automation", "createdBy": "automation",
"fileName": "e2678b5f-5917-4bb1-8b30-2006efcb720d.json", "fileName": "e2678b5f-5917-4bb1-8b30-2006efcb720d.json",
......
...@@ -42,8 +42,8 @@ public class MappingStoreImpl implements MappingStore { ...@@ -42,8 +42,8 @@ public class MappingStoreImpl implements MappingStore {
private RequestIdentity requestIdentity; private RequestIdentity requestIdentity;
@Override @Override
public List<MappingInfo> getMappingInfo(final String authority, final String entity, final String source, final String majorVersion) { public List<MappingInfo> getMappingInfo(final String authority, final String entity, final String source, final int majorVersion) {
String schemaKind = String.join(Constants.COLON_SEPARATOR, authority, source, entity, majorVersion); String schemaKind = String.join(Constants.COLON_SEPARATOR, authority, source, entity, Integer.toString(majorVersion));
SqlQuerySpec query = new SqlQuerySpec( SqlQuerySpec query = new SqlQuerySpec(
"SELECT * FROM c where c.sourceSchemaAuthority = @authority AND c.sourceEntityType = @entity AND " "SELECT * FROM c where c.sourceSchemaAuthority = @authority AND c.sourceEntityType = @entity AND "
......
...@@ -44,7 +44,7 @@ public class MappingStoreImplTest { ...@@ -44,7 +44,7 @@ public class MappingStoreImplTest {
private static final String AUTHORITY_NAME = "opendes"; private static final String AUTHORITY_NAME = "opendes";
private static final String SOURCE = "wks"; private static final String SOURCE = "wks";
private static final String ENTITY_TYPE = "wellbore"; private static final String ENTITY_TYPE = "wellbore";
private static final String MAJOR_VERSION = "1"; private static final int MAJOR_VERSION = 1;
private static final String WKS_SCHEMA_KIND = "opendes:wks:wellbore:1"; private static final String WKS_SCHEMA_KIND = "opendes:wks:wellbore:1";
@InjectMocks @InjectMocks
......
...@@ -41,7 +41,7 @@ public class MappingStoreImpl implements MappingStore { ...@@ -41,7 +41,7 @@ public class MappingStoreImpl implements MappingStore {
*/ */
@Override @Override
public List<MappingInfo> getMappingInfo(String authorityName, String entityNamePrefix, String sourceName, String majorVersion) { public List<MappingInfo> getMappingInfo(String authorityName, String entityNamePrefix, String sourceName, int majorVersion) {
return new ArrayList<>(); return new ArrayList<>();
} }
......
package org.opengroup.osdu.wks.model.mapping; package org.opengroup.osdu.wks.model.mapping;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*; import lombok.*;
import org.opengroup.osdu.wks.enums.MappingScope;
import java.sql.Timestamp;
@Getter @Getter
@Setter @Setter
@AllArgsConstructor @AllArgsConstructor
...@@ -15,16 +10,16 @@ import java.sql.Timestamp; ...@@ -15,16 +10,16 @@ import java.sql.Timestamp;
@Builder @Builder
public class MappingInfo { public class MappingInfo {
private String id; private String id;
private String version; private long version;
private String authority; private String authority;
private String sourceSchemaAuthority; private String sourceSchemaAuthority;
private String sourceSchemaSource; private String sourceSchemaSource;
private String sourceEntityType; private String sourceEntityType;
private String sourceSchemaMajorVersion; private int sourceSchemaMajorVersion;
private String sourceSchemaKind; private String sourceSchemaKind;
private String targetSchemaAuthority; private String targetSchemaAuthority;
private String targetSchemaSource; private String targetSchemaSource;
private String targetSchemaMajorVersion; private int targetSchemaMajorVersion;
private String targetEntityType; private String targetEntityType;
private String targetSchemaKind; private String targetSchemaKind;
private String fileName; private String fileName;
......
...@@ -6,6 +6,6 @@ import org.opengroup.osdu.wks.model.mapping.MappingDefinition; ...@@ -6,6 +6,6 @@ import org.opengroup.osdu.wks.model.mapping.MappingDefinition;
import org.opengroup.osdu.wks.model.mapping.MappingInfo; import org.opengroup.osdu.wks.model.mapping.MappingInfo;
public interface MappingStore { public interface MappingStore {
List<MappingInfo> getMappingInfo(String authorityName, String entityNamePrefix, String sourceName, String majorVersion); List<MappingInfo> getMappingInfo(String authorityName, String entityNamePrefix, String sourceName, int majorVersion);
MappingDefinition getMappingDefinitionFromStorage(MappingInfo mappingsInfo); MappingDefinition getMappingDefinitionFromStorage(MappingInfo mappingsInfo);
} }
...@@ -9,6 +9,6 @@ import org.opengroup.osdu.wks.model.mapping.MappingInfo; ...@@ -9,6 +9,6 @@ import org.opengroup.osdu.wks.model.mapping.MappingInfo;
public interface MappingService { public interface MappingService {
List<MappingDefinition> getMapping(String kind) throws ApplicationException; List<MappingDefinition> getMapping(String kind) throws ApplicationException;
List<MappingInfo> getMappingInfos(String authority, String entity, String source, String majorVersion); List<MappingInfo> getMappingInfos(String authority, String entity, String source, int majorVersion);
} }
...@@ -25,7 +25,7 @@ public class MappingServiceImpl implements MappingService { ...@@ -25,7 +25,7 @@ public class MappingServiceImpl implements MappingService {
String authorityName = kindUtil.retrieveAuthorityName(kind); String authorityName = kindUtil.retrieveAuthorityName(kind);
String entityNamePrefix = kindUtil.retrieveEntityName(kind); String entityNamePrefix = kindUtil.retrieveEntityName(kind);
String sourceName = kindUtil.retrieveSourceName(kind); String sourceName = kindUtil.retrieveSourceName(kind);
String majorVersion = kindUtil.retrieveMajorVersion(kind); int majorVersion = kindUtil.retrieveMajorVersion(kind);
List<MappingInfo> mappingInfos = mappingStore.getMappingInfo(authorityName, entityNamePrefix, sourceName, majorVersion); List<MappingInfo> mappingInfos = mappingStore.getMappingInfo(authorityName, entityNamePrefix, sourceName, majorVersion);
if(mappingInfos.isEmpty()) { if(mappingInfos.isEmpty()) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -34,7 +34,7 @@ public class MappingServiceImpl implements MappingService { ...@@ -34,7 +34,7 @@ public class MappingServiceImpl implements MappingService {
} }
@Override @Override
public List<MappingInfo> getMappingInfos(final String authority, final String entity, final String source, final String majorVersion) { public List<MappingInfo> getMappingInfos(final String authority, final String entity, final String source, final int majorVersion) {
return mappingStore.getMappingInfo(authority, entity, source, majorVersion); return mappingStore.getMappingInfo(authority, entity, source, majorVersion);
} }
......
...@@ -9,15 +9,6 @@ import java.util.stream.Stream; ...@@ -9,15 +9,6 @@ import java.util.stream.Stream;
@Component @Component
public class KindUtil { public class KindUtil {
public Integer getMajorVersionFromKind(String kind) {
String version = Stream.of(kind.split(Constants.COLON_SEPARATOR)).reduce( (first, last) -> last).get();
return Integer.parseInt(version.split("\\.")[0]);
}
public String getVersionFromKind(String kind) {
return Stream.of(kind.split(Constants.COLON_SEPARATOR)).reduce( (first, last) -> last).get();
}
public String prepareKind(String authority, String source, String entity, String majorVersion, public String prepareKind(String authority, String source, String entity, String majorVersion,
String minorVersion, String patchVersion) { String minorVersion, String patchVersion) {
...@@ -41,9 +32,9 @@ public class KindUtil { ...@@ -41,9 +32,9 @@ public class KindUtil {
return idArr[SchemaConstants.SOURCE_INDEX]; return idArr[SchemaConstants.SOURCE_INDEX];
} }
public String retrieveMajorVersion(String kind) { public int retrieveMajorVersion(String kind) {
String[] idArr = kind.split(Constants.COLON_SEPARATOR); String[] idArr = kind.split(Constants.COLON_SEPARATOR);
String version = idArr[SchemaConstants.VERSION_INDEX]; String version = idArr[SchemaConstants.VERSION_INDEX];
return version.split("\\.")[0]; return Integer.parseInt(version.split("\\.")[0]);
} }
} }
...@@ -280,7 +280,7 @@ public class RelationshipBlockHandler { ...@@ -280,7 +280,7 @@ public class RelationshipBlockHandler {
private List<WksInfo> getWKSRecordsCreatedByWKSService(String rawId, List<WksInfo> wksInfos, Kind rawKind) { private List<WksInfo> getWKSRecordsCreatedByWKSService(String rawId, List<WksInfo> wksInfos, Kind rawKind) {
List<WksInfo> result = new ArrayList<>(); List<WksInfo> result = new ArrayList<>();
String majorVersion = rawKind.getVersion().split("\\.")[0]; int majorVersion = kindUtil.retrieveMajorVersion(rawKind.getKindAsString());
// TODO Look out for performance improvement through caching (FYI: Once mapping service comes // TODO Look out for performance improvement through caching (FYI: Once mapping service comes
// online the entire logic of datastore look up will become obsolete) // online the entire logic of datastore look up will become obsolete)
List<MappingInfo> mappingInfos = mappingService.getMappingInfos(rawKind.getAuthority(), List<MappingInfo> mappingInfos = mappingService.getMappingInfos(rawKind.getAuthority(),
...@@ -305,7 +305,7 @@ public class RelationshipBlockHandler { ...@@ -305,7 +305,7 @@ public class RelationshipBlockHandler {
return result; return result;
} }
private String generateKind(String authority, String source, String entity, String majorVersion) { private String generateKind(String authority, String source, String entity, int majorVersion) {
String not = "0"; String not = "0";
return authority + Constants.COLON_SEPARATOR + source + Constants.COLON_SEPARATOR + entity return authority + Constants.COLON_SEPARATOR + source + Constants.COLON_SEPARATOR + entity
+ Constants.COLON_SEPARATOR + majorVersion + Constants.POINT + not + Constants.POINT + not; + Constants.COLON_SEPARATOR + majorVersion + Constants.POINT + not + Constants.POINT + not;
......
...@@ -19,7 +19,7 @@ public class WksIdGenerator { ...@@ -19,7 +19,7 @@ public class WksIdGenerator {
.toString(); .toString();
String[] idStrArr = rawId.split(Constants.COLON_SEPARATOR); String[] idStrArr = rawId.split(Constants.COLON_SEPARATOR);
String majorVersion = new KindUtil().getMajorVersionFromKind(targetSchemaKind).toString(); int majorVersion = new KindUtil().retrieveMajorVersion(targetSchemaKind);
String targetSchemaKindInMapping = targetSchemaKind.substring(0, targetSchemaKind.lastIndexOf(Constants.COLON_SEPARATOR)) + Constants.COLON_SEPARATOR + majorVersion; String targetSchemaKindInMapping = targetSchemaKind.substring(0, targetSchemaKind.lastIndexOf(Constants.COLON_SEPARATOR)) + Constants.COLON_SEPARATOR + majorVersion;
//Replacing semicolons here with dots since Record Id should be of the format a:b:c //Replacing semicolons here with dots since Record Id should be of the format a:b:c
......
...@@ -35,9 +35,9 @@ public class MappingServiceImplTest { ...@@ -35,9 +35,9 @@ public class MappingServiceImplTest {
when(kindUtil.retrieveAuthorityName(KIND)).thenReturn("tenant1"); when(kindUtil.retrieveAuthorityName(KIND)).thenReturn("tenant1");
when(kindUtil.retrieveSourceName(KIND)).thenReturn("source"); when(kindUtil.retrieveSourceName(KIND)).thenReturn("source");
when(kindUtil.retrieveEntityName(KIND)).thenReturn("entity"); when(kindUtil.retrieveEntityName(KIND)).thenReturn("entity");
when(kindUtil.retrieveMajorVersion(KIND)).thenReturn("1"); when(kindUtil.retrieveMajorVersion(KIND)).thenReturn(1);
MappingInfo mappingInfo = new MappingInfo(); MappingInfo mappingInfo = new MappingInfo();
when(mappingStore.getMappingInfo("tenant1", "source", "entity", "1")).thenReturn(Collections.singletonList(mappingInfo)); when(mappingStore.getMappingInfo("tenant1", "source", "entity", 1)).thenReturn(Collections.singletonList(mappingInfo));
List<MappingDefinition> mappings = mappingService.getMapping(KIND); List<MappingDefinition> mappings = mappingService.getMapping(KIND);
assertNotNull(mappings); assertNotNull(mappings);
} }
......
...@@ -13,6 +13,7 @@ import java.util.List; ...@@ -13,6 +13,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
...@@ -48,7 +49,7 @@ class RelationshipBlockHandlerTest { ...@@ -48,7 +49,7 @@ class RelationshipBlockHandlerTest {
private static final String AUTHORITY = "part1"; private static final String AUTHORITY = "part1";
private static final String SOURCE = "wks"; private static final String SOURCE = "wks";
private static final String ENTITY = "wellbore"; private static final String ENTITY = "wellbore";
private static final String MAJOR_VERSION = "1"; private static final int MAJOR_VERSION = 1;
@Mock @Mock
private StorageService storageService; private StorageService storageService;
...@@ -59,15 +60,16 @@ class RelationshipBlockHandlerTest { ...@@ -59,15 +60,16 @@ class RelationshipBlockHandlerTest {
@Mock @Mock
private MappingService mappingService; private MappingService mappingService;
@Mock
private KindUtil kindUtil;
@Mock @Mock
private TargetSchemaUtil targetSchemaUtil; private TargetSchemaUtil targetSchemaUtil;
@InjectMocks
private RelationshipBlockHandler relationshipBlockHandler; private RelationshipBlockHandler relationshipBlockHandler;
@BeforeEach
void setUp() {
relationshipBlockHandler = new RelationshipBlockHandler(storageService,searchService,mappingService,new KindUtil(),targetSchemaUtil);
}
@Test @Test
public void testRelationshipForOneToOneRelationshipWhenWKSFound() public void testRelationshipForOneToOneRelationshipWhenWKSFound()
throws IOException, ApplicationException, NotFoundException { throws IOException, ApplicationException, NotFoundException {
...@@ -93,6 +95,9 @@ class RelationshipBlockHandlerTest { ...@@ -93,6 +95,9 @@ class RelationshipBlockHandlerTest {
assertTrue(response.getPendingEnitites().size() == 0); assertTrue(response.getPendingEnitites().size() == 0);
} }
/*
When no WKS is found for related WKS, than WKS id is cooked for related raw record if mapping exist and added to relationship block
*/
@Test @Test