diff --git a/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java b/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java index c71fc0fe3..3b719f72a 100644 --- a/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java @@ -17,7 +17,14 @@ package org.apache.commons.lang3; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import java.lang.reflect.Constructor; +import java.lang.reflect.Modifier; + +import org.apache.commons.lang3.text.WordUtils; import org.junit.Test; /** @@ -25,6 +32,16 @@ import org.junit.Test; */ public class ClassPathUtilsTest { + @Test + public void testConstructor() { + assertNotNull(new ClassPathUtils()); + final Constructor[] cons = ClassPathUtils.class.getDeclaredConstructors(); + assertEquals(1, cons.length); + assertTrue(Modifier.isPublic(cons[0].getModifiers())); + assertTrue(Modifier.isPublic(ClassPathUtils.class.getModifiers())); + assertFalse(Modifier.isFinal(ClassPathUtils.class.getModifiers())); + } + @Test(expected = NullPointerException.class) public void testToFullyQualifiedNameNullClassString() throws Exception { ClassPathUtils.toFullyQualifiedName((Class) null, "Test.properties");