code: @SuppressWarnings("unchecked")
      public static <T> T newInstance(Class<T> classToInstantiate) {
          int modifiers = classToInstantiate.getModifiers();
  
          final Object object;
          if (Modifier.isInterface(modifiers)) {
              object = Proxy.newProxyInstance(WhiteboxImpl.class.getClassLoader(), new Class<?>[]{classToInstantiate},
                      new InvocationHandler() {
                          @Override
                          public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                              return TypeUtils.getDefaultValue(method.getReturnType());
                          }
                      });
          } else if (classToInstantiate.isArray()) {
              object = Array.newInstance(classToInstantiate.getComponentType(), 0);
          } else if (Modifier.isAbstract(modifiers)) {
              throw new IllegalArgumentException(
                                                        "Cannot instantiate an abstract class. Please use the ConcreteClassGenerator in PowerMock support to generate a concrete class first.");
          } else {
              Objenesis objenesis = new ObjenesisStd();
              ObjectInstantiator thingyInstantiator = objenesis.getInstantiatorOf(classToInstantiate);
              object = thingyInstantiator.newInstance();
          }
          return (T) object;
      }
docs: Create a new instance of a class without invoking its constructor.
  
  No byte-code manipulation is needed to perform this operation and thus
  it's not necessary use the {@code PowerMockRunner} or
  {@code PrepareForTest} annotation to use this functionality.
  
  @param <T>                The type of the instance to create.
  @param classToInstantiate The type of the instance to create.
  @return A new instance of type T, created without invoking the
  constructor.