/*
 * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
 * under one or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information regarding copyright
 * ownership. Camunda licenses this file to you under the Apache License,
 * Version 2.0; you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.camunda.bpm.run.qa;

import static org.assertj.core.api.Assertions.assertThat;

import java.net.URISyntaxException;
import java.nio.file.Path;
import java.nio.file.Paths;

import org.junit.Test;

public class SqlAvailabilityIT {

  @Test
  public void shouldFindSqlResources() throws URISyntaxException {
    Path sqlDir = Paths.get(SqlAvailabilityIT.class.getClassLoader().getResource("camunda-bpm-run-distro/configuration/sql/").toURI());

    Path createDir = sqlDir.resolve("create");
    Path dropDir = sqlDir.resolve("drop");
    Path upgradeDir = sqlDir.resolve("upgrade");

    assertThat(sqlDir).isNotNull();
    assertThat(createDir).isNotNull();
    assertThat(dropDir).isNotNull();
    assertThat(upgradeDir).isNotNull();
    assertThat(createDir.toFile().list()).hasSizeGreaterThan(0);
    assertThat(dropDir.toFile().list()).hasSizeGreaterThan(0);
    assertThat(upgradeDir.toFile().list()).hasSizeGreaterThan(0);
  }
}

@@ -856,35 +856,69 @@
 org.
-assertj.core.api.
+hamcrest.Matchers.*;%0Aimport static org.hamcrest.Matcher
 Assert
-ions
 .ass
@@ -1450,28 +1450,36 @@
 t(sqlDir
-).isNotNull(
+, is(notNullValue())
 );%0A    a
@@ -1493,36 +1493,44 @@
 at(createDir
-).isNotNull(
+, is(notNullValue())
 );%0A    asser
@@ -1542,28 +1542,36 @@
 (dropDir
-).isNotNull(
+, is(notNullValue())
 );%0A    a
@@ -1594,20 +1594,28 @@
 eDir
-).isNotNull(
+, is(notNullValue())
 );%0A 
@@ -1649,34 +1649,37 @@
 ile().list()
-).hasSizeG
+.length, is(g
 reaterThan(0
@@ -1671,32 +1671,34 @@
 s(greaterThan(0)
+))
 ;%0A    assertThat
@@ -1717,34 +1717,37 @@
 ile().list()
-).hasSizeG
+.length, is(g
 reaterThan(0
@@ -1743,24 +1743,26 @@
 eaterThan(0)
+))
 ;%0A    assert
@@ -1796,18 +1796,21 @@
 st()
-).hasSizeG
+.length, is(g
 reat
@@ -1818,16 +1818,18 @@
 rThan(0)
+))
 ;%0A  %7D%0A%7D%0A

use hamcrest instead of assertj