+ CountDownLatch threadCountDownLatch = new CountDownLatch(10);
+
+ for (int i = 0; i < 10; i++) {
+ new Thread() {
+ public void run() {
+ assertThatCode(() -> databaseProvider.createPolicyTypes(serviceTemplate))
+ .doesNotThrowAnyException();
+ threadCountDownLatch.countDown();
+ }
+ }.start();
+ }
+
+ threadCountDownLatch.await(9, TimeUnit.SECONDS);