Test coverage : openecomp-nosqldb-api 81/69981/3
authorsiddharth0905 <siddharth.singh4@amdocs.com>
Mon, 8 Oct 2018 11:36:27 +0000 (17:06 +0530)
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>
Tue, 9 Oct 2018 07:59:46 +0000 (07:59 +0000)
Increase test coverage

Change-Id: If8b4b8e961278eb1448e8467cd7ac8e136c16315
Issue-ID: SDC-1673
Signed-off-by: siddharth0905 <siddharth.singh4@amdocs.com>
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/BaseDao.java
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDao.java
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDaoFactory.java
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/types/UniqueValueEntity.java
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/api/NoSqlDb.java
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/factory/NoSqlDbFactory.java
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java
openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/test/java/org/openecomp/core/util/UniqueValueUtilTest.java [new file with mode: 0644]

index a628903..16cc4ac 100644 (file)
             <version>${project.version}</version>
             <scope>runtime</scope>
         </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>${testng.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <version>${mockito.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 
index c7623f8..fa23b51 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,13 +24,13 @@ import java.util.Collection;
 
 public interface BaseDao<T> {
 
-  Collection<T> list(T entity);
+    Collection<T> list(T entity);
 
-  void create(T entity);
+    void create(T entity);
 
-  void update(T entity);
+    void update(T entity);
 
-  T get(T entity);
+    T get(T entity);
 
-  void delete(T entity);
+    void delete(T entity);
 }
index 1fa4bb2..36dfefa 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,6 @@
 
 package org.openecomp.core.dao;
 
-
 import org.openecomp.core.dao.types.UniqueValueEntity;
 
 public interface UniqueValueDao extends BaseDao<UniqueValueEntity> {
index 9f57e4f..022ad8e 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,7 +24,8 @@ import org.openecomp.core.factory.api.AbstractComponentFactory;
 import org.openecomp.core.factory.api.AbstractFactory;
 
 public abstract class UniqueValueDaoFactory extends AbstractComponentFactory<UniqueValueDao> {
-  public static UniqueValueDaoFactory getInstance() {
-    return AbstractFactory.getInstance(UniqueValueDaoFactory.class);
-  }
+
+    public static UniqueValueDaoFactory getInstance() {
+        return AbstractFactory.getInstance(UniqueValueDaoFactory.class);
+    }
 }
index c53280e..24038b9 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,42 +23,21 @@ package org.openecomp.core.dao.types;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
 
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@NoArgsConstructor
+@AllArgsConstructor
+@Getter
+@Setter
 @Table(name = "unique_value")
 public class UniqueValueEntity {
 
-  @PartitionKey
-  private String type;
-
-  @PartitionKey(value = 1)
-  private String value;
-
-  /**
-   * Every entity class must have a default constructor according to
-   * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
-   * Definition of mapped classes</a>.
-   */
-  public UniqueValueEntity() {
-    // Don't delete! Default constructor is required by DataStax driver
-  }
-
-  public UniqueValueEntity(String type, String value) {
-    this.type = type;
-    this.value = value;
-  }
-
-  public String getType() {
-    return type;
-  }
-
-  public void setType(String type) {
-    this.type = type;
-  }
-
-  public String getValue() {
-    return value;
-  }
+    @PartitionKey
+    private String type;
 
-  public void setValue(String value) {
-    this.value = value;
-  }
+    @PartitionKey(value = 1)
+    private String value;
 }
index 56d15a8..ff4661c 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,15 +25,15 @@ import com.datastax.driver.mapping.MappingManager;
 
 public interface NoSqlDb {
 
-  //TODO: remove cassandra types from here!! (like done in SDC...).
+    //TODO: remove cassandra types from here!! (like done in SDC...).
 
-  void insert(String tableName, String[] colNames, Object[] values);
+    void insert(String tableName, String[] colNames, Object[] values);
 
-  ResultSet execute(String statement);
+    ResultSet execute(String statement);
 
-  ResultSet execute(String statementName, Object... values);
+    ResultSet execute(String statementName, Object... values);
 
-  MappingManager getMappingManager();
+    MappingManager getMappingManager();
 
-  String getVersion();
+    String getVersion();
 }
index ede264f..31b6f6a 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,8 +27,8 @@ import org.openecomp.core.nosqldb.api.NoSqlDb;
 
 public abstract class NoSqlDbFactory extends AbstractComponentFactory<NoSqlDb> {
 
-  public static NoSqlDbFactory getInstance() {
+    public static NoSqlDbFactory getInstance() {
 
-    return AbstractFactory.getInstance(NoSqlDbFactory.class);
-  }
+        return AbstractFactory.getInstance(NoSqlDbFactory.class);
+    }
 }
index 0ba7228..aded1fa 100644 (file)
@@ -28,120 +28,120 @@ import org.openecomp.sdc.common.errors.ErrorCode;
 
 public class UniqueValueUtil {
 
-  private static final String UNIQUE_VALUE_VIOLATION = "UNIQUE_VALUE_VIOLATION";
-  private static final String UNIQUE_VALUE_VIOLATION_MSG = "%s with the value '%s' already exists.";
-  private static final char FORMATTED_UNIQUE_VALUE_SEPARATOR = '_';
-
-  private final UniqueValueDao uniqueValueDao;
-
-  public UniqueValueUtil(UniqueValueDao uniqueValueDao) {
-    this.uniqueValueDao = uniqueValueDao;
-  }
-
-  /**
-   * Create unique value.
-   *
-   * @param type              the type
-   * @param uniqueCombination the unique combination
-   */
-  public void createUniqueValue(String type, String... uniqueCombination) {
-    String originalEntityName = null;
-    if (ArrayUtils.isNotEmpty(uniqueCombination)) {
-      originalEntityName = uniqueCombination[uniqueCombination.length - 1];
+    private static final String UNIQUE_VALUE_VIOLATION = "UNIQUE_VALUE_VIOLATION";
+    private static final String UNIQUE_VALUE_VIOLATION_MSG = "%s with the value '%s' already exists.";
+    private static final char FORMATTED_UNIQUE_VALUE_SEPARATOR = '_';
+
+    private final UniqueValueDao uniqueValueDao;
+
+    public UniqueValueUtil(UniqueValueDao uniqueValueDao) {
+        this.uniqueValueDao = uniqueValueDao;
     }
 
-    Optional<String> formattedValue = formatValue(uniqueCombination);
-    if (formattedValue.isPresent()) {
-      validateUniqueValue(type, formattedValue.get(), originalEntityName);
-      uniqueValueDao.create(new UniqueValueEntity(type, formattedValue.get()));
+    /**
+     * Create unique value.
+     *
+     * @param type              the type
+     * @param uniqueCombination the unique combination
+     */
+    public void createUniqueValue(String type, String... uniqueCombination) {
+        String originalEntityName = null;
+        if (ArrayUtils.isNotEmpty(uniqueCombination)) {
+            originalEntityName = uniqueCombination[uniqueCombination.length - 1];
+        }
+
+        Optional<String> formattedValue = formatValue(uniqueCombination);
+        if (formattedValue.isPresent()) {
+            validateUniqueValue(type, formattedValue.get(), originalEntityName);
+            uniqueValueDao.create(new UniqueValueEntity(type, formattedValue.get()));
+        }
     }
-  }
-
-  /**
-   * Delete unique value.
-   *
-   * @param type              the type
-   * @param uniqueCombination the unique combination
-   */
-  public void deleteUniqueValue(String type, String... uniqueCombination) {
-    formatValue(uniqueCombination).ifPresent(
-        formattedValue -> uniqueValueDao.delete(new UniqueValueEntity(type, formattedValue)));
-
-  }
-
-  /**
-   * Update unique value.
-   *
-   * @param type          the type
-   * @param oldValue      the old value
-   * @param newValue      the new value
-   * @param uniqueContext the unique context
-   */
-  public void updateUniqueValue(String type, String oldValue, String newValue,
-                                String... uniqueContext) {
-    if (newValue == null || oldValue == null || !newValue.equalsIgnoreCase(oldValue)) {
-      createUniqueValue(type, CommonMethods.concat(uniqueContext, new String[]{newValue}));
-      deleteUniqueValue(type, CommonMethods.concat(uniqueContext, new String[]{oldValue}));
+
+    /**
+     * Delete unique value.
+     *
+     * @param type              the type
+     * @param uniqueCombination the unique combination
+     */
+    public void deleteUniqueValue(String type, String... uniqueCombination) {
+        formatValue(uniqueCombination).ifPresent(
+                formattedValue -> uniqueValueDao.delete(new UniqueValueEntity(type, formattedValue)));
+
     }
-  }
-
-  /**
-   * Validate unique value.
-   *
-   * @param type              the type
-   * @param uniqueCombination the unique combination
-   */
-  public void validateUniqueValue(String type, String... uniqueCombination) {
-    String originalEntityName = null;
-    if (ArrayUtils.isNotEmpty(uniqueCombination)) {
-      originalEntityName = uniqueCombination[uniqueCombination.length - 1];
+
+    /**
+     * Update unique value.
+     *
+     * @param type          the type
+     * @param oldValue      the old value
+     * @param newValue      the new value
+     * @param uniqueContext the unique context
+     */
+    public void updateUniqueValue(String type, String oldValue, String newValue,
+                                  String... uniqueContext) {
+        if (newValue == null || !newValue.equalsIgnoreCase(oldValue)) {
+            createUniqueValue(type, CommonMethods.concat(uniqueContext, new String[] {newValue}));
+            deleteUniqueValue(type, CommonMethods.concat(uniqueContext, new String[] {oldValue}));
+        }
     }
 
-    Optional<String> formattedValue = formatValue(uniqueCombination);
-    if (formattedValue.isPresent()) {
-      validateUniqueValue(type, formattedValue.get(), originalEntityName);
+    /**
+     * Validate unique value.
+     *
+     * @param type              the type
+     * @param uniqueCombination the unique combination
+     */
+    public void validateUniqueValue(String type, String... uniqueCombination) {
+        String originalEntityName = null;
+        if (ArrayUtils.isNotEmpty(uniqueCombination)) {
+            originalEntityName = uniqueCombination[uniqueCombination.length - 1];
+        }
+
+        Optional<String> formattedValue = formatValue(uniqueCombination);
+        if (formattedValue.isPresent()) {
+            validateUniqueValue(type, formattedValue.get(), originalEntityName);
+        }
     }
-  }
-
-  /**
-   * Checks if a unique value is taken.
-   *
-   * @return true if the unique value is occupied, false otherwise
-   */
-  public boolean isUniqueValueOccupied(String type, String... uniqueCombination) {
-    return formatValue(uniqueCombination)
-        .map(formattedValue -> isUniqueValueOccupied(type, formattedValue))
-        .orElse(false);
-  }
-
-  private void validateUniqueValue(String type, String formattedValue, String originalEntityName) {
-    if (isUniqueValueOccupied(type, formattedValue)) {
-      throw new CoreException(new ErrorCode.ErrorCodeBuilder()
-          .withCategory(ErrorCategory.APPLICATION)
-          .withId(UNIQUE_VALUE_VIOLATION)
-          .withMessage(String
-              .format(UNIQUE_VALUE_VIOLATION_MSG, type, originalEntityName))
-          .build());
+
+    private void validateUniqueValue(String type, String formattedValue, String originalEntityName) {
+        if (isUniqueValueOccupied(type, formattedValue)) {
+            throw new CoreException(new ErrorCode.ErrorCodeBuilder()
+                    .withCategory(ErrorCategory.APPLICATION)
+                    .withId(UNIQUE_VALUE_VIOLATION)
+                    .withMessage(String
+                            .format(UNIQUE_VALUE_VIOLATION_MSG, type, originalEntityName))
+                    .build());
+        }
     }
-  }
 
-  private boolean isUniqueValueOccupied(String type, String formattedValue) {
-    return uniqueValueDao.get(new UniqueValueEntity(type, formattedValue)) != null;
-  }
+    /**
+     * Checks if a unique value is taken.
+     *
+     * @return true if the unique value is occupied, false otherwise
+     */
+    public boolean isUniqueValueOccupied(String type, String... uniqueCombination) {
+        return formatValue(uniqueCombination)
+                .map(formattedValue -> isUniqueValueOccupied(type, formattedValue))
+                .orElse(false);
+    }
 
-  private static Optional<String> formatValue(String[] uniqueCombination) {
-    if (uniqueCombination == null || uniqueCombination.length == 0
-        || getValueWithoutContext(uniqueCombination) == null) {
-      return Optional.empty();
+    private boolean isUniqueValueOccupied(String type, String formattedValue) {
+        return uniqueValueDao.get(new UniqueValueEntity(type, formattedValue)) != null;
     }
 
-    uniqueCombination[uniqueCombination.length - 1] =
-        getValueWithoutContext(uniqueCombination).toLowerCase();
-    return Optional.of(CommonMethods
-        .arrayToSeparatedString(uniqueCombination, FORMATTED_UNIQUE_VALUE_SEPARATOR));
-  }
+    private static Optional<String> formatValue(String[] uniqueCombination) {
+        if (uniqueCombination == null || uniqueCombination.length == 0
+                || getValueWithoutContext(uniqueCombination) == null) {
+            return Optional.empty();
+        }
 
-  private static String getValueWithoutContext(String... uniqueCombination) {
-    return uniqueCombination[uniqueCombination.length - 1];
-  }
+        uniqueCombination[uniqueCombination.length - 1] =
+                getValueWithoutContext(uniqueCombination).toLowerCase();
+        return Optional.of(CommonMethods
+                .arrayToSeparatedString(uniqueCombination, FORMATTED_UNIQUE_VALUE_SEPARATOR));
+    }
+
+    private static String getValueWithoutContext(String... uniqueCombination) {
+        return uniqueCombination[uniqueCombination.length - 1];
+    }
 }
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/test/java/org/openecomp/core/util/UniqueValueUtilTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/test/java/org/openecomp/core/util/UniqueValueUtilTest.java
new file mode 100644 (file)
index 0000000..eeae2f7
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ *
+ *  Copyright © 2017-2018 European Support Limited
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  * Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * /
+ *
+ */
+
+package org.openecomp.core.util;
+
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.core.dao.UniqueValueDao;
+import org.openecomp.core.dao.types.UniqueValueEntity;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class UniqueValueUtilTest {
+
+    private static final String ENTITLEMENT_POOL_NAME = "Entitlement Pool name";
+    private static final String ORIGINAL_ENTITY_NAME = "originalEntityName";
+
+    @Mock
+    private UniqueValueDao uniqueValueDao;
+
+    private UniqueValueUtil uniqueValueUtil;
+
+    @BeforeMethod
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        uniqueValueUtil = new UniqueValueUtil(uniqueValueDao);
+    }
+
+    @Test
+    public void testCreateUniqueValue() {
+        Mockito.when(uniqueValueDao.get(Mockito.any())).thenReturn(null);
+        uniqueValueUtil.createUniqueValue(ENTITLEMENT_POOL_NAME, ORIGINAL_ENTITY_NAME);
+
+        Mockito.verify(uniqueValueDao, Mockito.times(1)).create(Mockito.any());
+    }
+
+    @Test(expectedExceptions = CoreException.class)
+    public void testCreateUniqueValueNotUnique() {
+        Mockito.when(uniqueValueDao.get(Mockito.any())).thenReturn(new UniqueValueEntity());
+        uniqueValueUtil.createUniqueValue(ENTITLEMENT_POOL_NAME, ORIGINAL_ENTITY_NAME);
+
+        Mockito.verify(uniqueValueDao, Mockito.times(1)).create(Mockito.any());
+    }
+
+    @Test
+    public void testDeleteUniqueValue() {
+        Mockito.doNothing().when(uniqueValueDao).delete(Mockito.any());
+        uniqueValueUtil.deleteUniqueValue(ENTITLEMENT_POOL_NAME, ORIGINAL_ENTITY_NAME);
+
+        Mockito.verify(uniqueValueDao, Mockito.times(1)).delete(Mockito.any());
+    }
+
+    @Test
+    public void testDeleteUniqueValueNoValue() {
+        uniqueValueUtil.deleteUniqueValue(ENTITLEMENT_POOL_NAME);
+        Mockito.verify(uniqueValueDao, Mockito.times(0)).delete(Mockito.any());
+    }
+
+    @Test
+    public void testUpdateUniqueValue() {
+        Mockito.when(uniqueValueDao.get(Mockito.any())).thenReturn(null);
+        Mockito.doNothing().when(uniqueValueDao).delete(Mockito.any());
+
+        uniqueValueUtil.updateUniqueValue(ENTITLEMENT_POOL_NAME, "oldName", "newName", "uniqueContext");
+
+        Mockito.verify(uniqueValueDao, Mockito.times(1)).create(Mockito.any());
+        Mockito.verify(uniqueValueDao, Mockito.times(1)).delete(Mockito.any());
+    }
+
+    @Test
+    public void testValidateUniqueValue() {
+        Mockito.when(uniqueValueDao.get(Mockito.any())).thenReturn(null);
+        uniqueValueUtil.validateUniqueValue(ENTITLEMENT_POOL_NAME, ORIGINAL_ENTITY_NAME);
+
+        Mockito.verify(uniqueValueDao, Mockito.times(1)).get(Mockito.any());
+    }
+
+    @Test(expectedExceptions = CoreException.class)
+    public void testValidateUniqueValueNotUnique() {
+        Mockito.when(uniqueValueDao.get(Mockito.any())).thenReturn(new UniqueValueEntity());
+        uniqueValueUtil.createUniqueValue(ENTITLEMENT_POOL_NAME, ORIGINAL_ENTITY_NAME);
+
+        Mockito.verify(uniqueValueDao, Mockito.times(1)).get(Mockito.any());
+    }
+
+    @Test
+    public void testIsUniqueValueOccupied() {
+        Mockito.when(uniqueValueDao.get(Mockito.any())).thenReturn(new UniqueValueEntity());
+        Assert.assertTrue(uniqueValueUtil.isUniqueValueOccupied(ENTITLEMENT_POOL_NAME, ORIGINAL_ENTITY_NAME));
+    }
+
+    @Test
+    public void testIsUniqueValueOccupiedFalse() {
+        Mockito.when(uniqueValueDao.get(Mockito.any())).thenReturn(null);
+        Assert.assertFalse(uniqueValueUtil.isUniqueValueOccupied(ENTITLEMENT_POOL_NAME, ORIGINAL_ENTITY_NAME));
+    }
+}