@Override
  public void start() {
    if (embeddedDatabase == null) {
      String jdbcUrl = config.get(JDBC_URL.getKey()).get();
      if (startsWith(jdbcUrl, URL_PREFIX)) {
        embeddedDatabase = createEmbeddedDatabase();
        embeddedDatabase.start();
      }
    }
  }
@Test
  public void should_not_start_mem_h2_database() {
    settings.setProperty(JDBC_URL.getKey(), "jdbc:h2:mem");

    EmbeddedDatabase embeddedDatabase = mock(EmbeddedDatabase.class);

    EmbeddedDatabaseFactory databaseFactory = new EmbeddedDatabaseFactory(settings.asConfig(), system2) {
      @Override
      EmbeddedDatabase createEmbeddedDatabase() {
        return embeddedDatabase;
      }
    };
    databaseFactory.start();

    verify(embeddedDatabase, never()).start();
  }