/* Licensed under the Apache License, Version 2.0 (the "License");
 * 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.flowable.engine.test.impl.calendar;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.StringContains.containsString;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.impl.calendar.BusinessCalendar;
import org.flowable.common.engine.impl.calendar.CycleBusinessCalendar;
import org.flowable.common.engine.impl.calendar.MapBusinessCalendarManager;
import org.junit.jupiter.api.Test;

/**
 * Created by martin.grofcik
 */
public class MapBusinessCalendarManagerTest {

    @Test
    public void testMapConstructor() {
        Map<String, BusinessCalendar> calendars = new HashMap<>(1);
        CycleBusinessCalendar calendar = new CycleBusinessCalendar(null);
        calendars.put("someKey", calendar);
        MapBusinessCalendarManager businessCalendarManager = new MapBusinessCalendarManager(calendars);

        assertEquals(calendar, businessCalendarManager.getBusinessCalendar("someKey"));
    }

    @Test
    public void testInvalidCalendarNameRequest() {
        @SuppressWarnings("unchecked")
        MapBusinessCalendarManager businessCalendarManager = new MapBusinessCalendarManager(Collections.EMPTY_MAP);

        try {
            businessCalendarManager.getBusinessCalendar("INVALID");
            fail("ActivitiException expected");
        } catch (FlowableException e) {
            assertThat(e.getMessage(), containsString("INVALID does not exist"));
        }
    }

    @Test
    public void testNullCalendars() {
        try {
            new MapBusinessCalendarManager(null);
            fail("AssertionError expected");
        } catch (IllegalArgumentException e) {
            // Expected error
        }
    }
}

@@ -173,17 +173,16 @@
 se at%0A *
- 
 %0A *     
@@ -227,17 +227,16 @@
 E-2.0%0A *
- 
 %0A * Unle
@@ -625,30 +625,35 @@
 org.
-hamcrest.Matcher
+assertj.core.api.
 Assert
+ions
 .ass
@@ -683,165 +683,54 @@
 org.
-hamcrest.core.StringContains.containsString;%0Aimport static org.junit.jupiter.api.Assertions.assertEquals;%0Aimport static org.junit.jupiter.api.Assertions.fail
+assertj.core.api.Assertions.assertThatThrownBy
 ;%0A%0Ai
@@ -1555,25 +1555,13 @@
 sert
-Equals(calendar, 
+That(
 busi
@@ -1611,16 +1611,36 @@
 meKey%22))
+.isEqualTo(calendar)
 ;%0A    %7D%0A
@@ -1865,33 +1865,40 @@
         
-try %7B%0A           
+assertThatThrownBy(() -%3E
  busines
@@ -1944,17 +1944,17 @@
 NVALID%22)
-;
+)
 %0A       
@@ -1962,60 +1962,32 @@
     
-fail(%22ActivitiException expected%22);%0A        %7D catch 
+    .isExactlyInstanceOf
 (Flo
@@ -1992,37 +1992,39 @@
 lowableException
- e) %7B
+.class)
 %0A            ass
@@ -2024,46 +2024,30 @@
     
-assertThat(e.get
+    .has
 Message
-(), c
+C
 ontain
-sStr
 ing(
@@ -2071,28 +2071,17 @@
  exist%22)
-);%0A        %7D
+;
 %0A    %7D%0A%0A
@@ -2140,25 +2140,32 @@
     
-try %7B%0A           
+assertThatThrownBy(() -%3E
  new
@@ -2193,25 +2193,25 @@
 anager(null)
-;
+)
 %0A           
@@ -2215,127 +2215,65 @@
     
-fail(%22AssertionError expected%22);%0A        %7D catch (IllegalArgumentException e) %7B%0A            // Expected error%0A        %7D
+    .isExactlyInstanceOf(IllegalArgumentException.class);
 %0A   

Use assertj fluent style in flowable-engine module. This is for the `org.flowable.engine.test.impl.calendar` package. There is a single file in this package that had a mixture of assertion styles.