code: public <T> T newInstance(Class<T> clazz) throws IllegalAccessException, InstantiationException {
          return clazz.newInstance();
      }
docs: Create a new instance of a class.
  <p>
  Provided to allow mocking, making it possible to test the exception handling.
  </p>
  
  @param clazz class to create new instance of
  @param <T> type of object to create
  @return new class instance
  @throws IllegalAccessException see {@link Class#newInstance()}
  @throws InstantiationException see {@link Class#newInstance()}