code: public static MockiEbean start(EbeanServer mock) {
  
      // using $mock as the server name
      EbeanServer original = Ebean.mock("$mock", mock, true);
  
      if (mock instanceof DelegateAwareEbeanServer) {
        ((DelegateAwareEbeanServer)mock).withDelegateIfRequired(original);
      }
  
      return new MockiEbean(mock, original);
    }
docs: Set a mock implementation of EbeanServer as the default server.
  <p>
  Typically the mock instance passed in is created by Mockito or similar tool.
  <p>
  The default EbeanSever is the instance returned by {@link Ebean#getServer(String)} when the
  server name is null.
  
  @param mock the mock instance that becomes the default EbeanServer
  @return The MockiEbean with a {@link #restoreOriginal()} method that can be used to restore the
  original EbeanServer implementation.