code: public static void useProviderForType(Class<?> type, FakeProvider<?> provider) {
      if (bridge == null) {
        throw new IllegalStateException("Must call initMocks() before calling useProviderForType()");
      }
      if (bridge.registeredMocks.containsKey(type)) {
        throw new IllegalArgumentException(
            "Can't use a provider for a type that already has a @GwtMock declared");
      }
      bridge.registeredProviders.put(type, provider);
    }
docs: Specifies that the given provider should be used to GWT.create instances of
  the given type and its subclasses. If multiple providers could produce a
  given class (for example, if a provide is registered for a type and its
  supertype), the provider for the more specific type is chosen. An exception
  is thrown if this type is ambiguous. Note that if you just want to return a
  Mockito mock from GWT.create, it's probably easier to use {@link GwtMock}
  instead.