transcendental-lisp/test/util/CharactersTest.java

22 lines
499 B
Java

package util;
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import org.junit.Test;
public class CharactersTest {
@Test
public void constructorIsPrivate() throws Exception {
Constructor<Characters> constructor = Characters.class.getDeclaredConstructor();
assertTrue(Modifier.isPrivate(constructor.getModifiers()));
constructor.setAccessible(true);
constructor.newInstance();
}
}