通过反射来测试
@Test
void userConstructorTest() throws NoSuchMethodException, InstantiationException, IllegalAccessException {
final Constructor constructor = User.class.getDeclaredConstructor();
constructor.setAccessible(true);
try {
constructor.newInstance();
} catch (InvocationTargetException e) {
throw (UnsupportedOperationException) e.getTargetException();
}
}