@Before
  public void setupInMemoryDB() {
    InMemoryDefaultTestModule testModule = new InMemoryDefaultTestModule();

    Properties properties = testModule.getProperties();
    properties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), JDBC_IN_MEMORY_URL_CREATE);
    properties.setProperty(Configuration.SERVER_JDBC_DRIVER.getKey(), Configuration.JDBC_IN_MEMORY_DRIVER);
    injector = Guice.createInjector(testModule);

    injector.getInstance(PersistService.class).start();

    amc = injector.getInstance(AmbariManagementController.class);

    userResourceProvider = new UserResourceProvider(amc);
    injector.injectMembers(userResourceProvider);

    userAuthenticationSourceResourceProvider = new UserAuthenticationSourceResourceProvider();
    injector.injectMembers(userAuthenticationSourceResourceProvider);


    ResourceProviderFactory factory = createMock(ResourceProviderFactory.class);
    expect(factory.getUserAuthenticationSourceResourceProvider()).andReturn(userAuthenticationSourceResourceProvider).anyTimes();
    replay(factory);
    AbstractControllerResourceProvider.init(factory);

  }
Sets up the in-memory database for the test suite.
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderDBTest.java