diff --git a/jans-orm/filter/pom.xml b/jans-orm/filter/pom.xml
index 4ce343a4f66..ccabd0f6587 100644
--- a/jans-orm/filter/pom.xml
+++ b/jans-orm/filter/pom.xml
@@ -11,11 +11,28 @@
1.0.2-SNAPSHOT
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ false
+
+
+
+
+
io.jans
jans-orm-util
+
+ org.testng
+ testng
+ test
+
\ No newline at end of file
diff --git a/jans-orm/filter/src/test/java/io/jans/orm/search/filter/FileProcessorTest.java b/jans-orm/filter/src/test/java/io/jans/orm/search/filter/FileProcessorTest.java
new file mode 100644
index 00000000000..2bb8afbbc32
--- /dev/null
+++ b/jans-orm/filter/src/test/java/io/jans/orm/search/filter/FileProcessorTest.java
@@ -0,0 +1,19 @@
+package io.jans.orm.search.filter;
+
+import io.jans.orm.util.StringHelper;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertNotNull;
+
+/**
+ * @author Yuriy Z
+ */
+public class FileProcessorTest {
+
+ @Test
+ public void simpleFilter_whenRun_shouldProduceFilter() {
+ final Filter filter = Filter.createEqualityFilter(Filter.createLowercaseFilter("uid"), StringHelper.toLowerCase("1"));
+ FilterProcessor filterProcessor = new FilterProcessor();
+ assertNotNull(filterProcessor.excludeFilter(filter, FilterProcessor.OBJECT_CLASS_EQUALITY_FILTER, FilterProcessor.OBJECT_CLASS_PRESENCE_FILTER));
+ }
+}
diff --git a/jans-orm/filter/src/test/resources/testng.xml b/jans-orm/filter/src/test/resources/testng.xml
new file mode 100644
index 00000000000..1c2e0c64fd1
--- /dev/null
+++ b/jans-orm/filter/src/test/resources/testng.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jans-orm/pom.xml b/jans-orm/pom.xml
index ab847b1525f..8aeb0033ac6 100644
--- a/jans-orm/pom.xml
+++ b/jans-orm/pom.xml
@@ -128,6 +128,19 @@
jacoco-maven-plugin
${jacoco.version}
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.19.1
+
+ @{argLine}
+ false
+ false
+
+ target/test-classes/testng.xml
+
+
+
diff --git a/jans-orm/util/pom.xml b/jans-orm/util/pom.xml
index 1cbd8f45da1..af8aa9c3bb3 100644
--- a/jans-orm/util/pom.xml
+++ b/jans-orm/util/pom.xml
@@ -11,6 +11,18 @@
1.0.2-SNAPSHOT
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ false
+
+
+
+
+
@@ -26,6 +38,12 @@
org.apache.commons
commons-text
+
+
+ org.testng
+ testng
+ test
+
\ No newline at end of file
diff --git a/jans-orm/util/src/main/java/io/jans/orm/util/StringHelper.java b/jans-orm/util/src/main/java/io/jans/orm/util/StringHelper.java
index 7397bfa1d4d..1ac8a59ad72 100644
--- a/jans-orm/util/src/main/java/io/jans/orm/util/StringHelper.java
+++ b/jans-orm/util/src/main/java/io/jans/orm/util/StringHelper.java
@@ -6,6 +6,8 @@
package io.jans.orm.util;
+import org.apache.commons.text.StringEscapeUtils;
+
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
@@ -13,9 +15,6 @@
import java.util.Map;
import java.util.StringTokenizer;
-import org.apache.commons.lang.NotImplementedException;
-import org.apache.commons.text.StringEscapeUtils;
-
public final class StringHelper {
public static final byte[] EMPTY_BYTES = new byte[0];
@@ -349,10 +348,6 @@ public static boolean toBoolean(Boolean value, boolean defaultValue) {
}
public static boolean isEmptyString(Object string) {
- if (string == null) {
- return false;
- }
-
return !(string instanceof String) || isEmpty((String) string);
}
diff --git a/jans-orm/util/src/test/java/io/jans/orm/util/StringHelperTest.java b/jans-orm/util/src/test/java/io/jans/orm/util/StringHelperTest.java
new file mode 100644
index 00000000000..e36ac345f30
--- /dev/null
+++ b/jans-orm/util/src/test/java/io/jans/orm/util/StringHelperTest.java
@@ -0,0 +1,28 @@
+package io.jans.orm.util;
+
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertFalse;
+
+/**
+ * @author Yuriy Z
+ */
+public class StringHelperTest {
+
+ @Test
+ public void isEmptyString_forNull_shouldReturnTrue() {
+ assertTrue(StringHelper.isEmptyString(null));
+ }
+
+ @Test
+ public void isEmptyString_forEmptyString_shouldReturnTrue() {
+ assertTrue(StringHelper.isEmptyString(""));
+ }
+
+ @Test
+ public void isEmptyString_forNonEmptyString_shouldReturnFalse() {
+ assertFalse(StringHelper.isEmptyString("df"));
+ }
+
+}
diff --git a/jans-orm/util/src/test/resources/testng.xml b/jans-orm/util/src/test/resources/testng.xml
new file mode 100644
index 00000000000..ca16cae6ef2
--- /dev/null
+++ b/jans-orm/util/src/test/resources/testng.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file