21 lines
438 B
Java
21 lines
438 B
Java
|
package util;
|
||
|
|
||
|
import static org.junit.Assert.assertTrue;
|
||
|
|
||
|
import java.lang.reflect.*;
|
||
|
|
||
|
import org.junit.Test;
|
||
|
|
||
|
public class PathTester {
|
||
|
|
||
|
@Test
|
||
|
public void constructorIsPrivate() throws Exception {
|
||
|
Constructor<Path> constructor = Path.class.getDeclaredConstructor();
|
||
|
|
||
|
assertTrue(Modifier.isPrivate(constructor.getModifiers()));
|
||
|
constructor.setAccessible(true);
|
||
|
constructor.newInstance();
|
||
|
}
|
||
|
|
||
|
}
|