transcendental-lisp/test/util/PathTest.java

23 lines
531 B
Java

package util;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import org.junit.Test;
public class PathTest {
@Test
public void constructorIsPrivate() throws Exception {
Constructor<Path> constructor = Path.class.getDeclaredConstructor();
assertThat(Modifier.isPrivate(constructor.getModifiers()), is(true));
constructor.setAccessible(true);
constructor.newInstance();
}
}