Skip to content

Commit

Permalink
[MODORSERS-1026] - Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
azizbekxm committed Apr 2, 2024
1 parent 7e4980b commit fa557e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/test/java/org/folio/rest/impl/RoutingListsApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@
public class RoutingListsApiTest {

private static final Logger logger = LogManager.getLogger();
private static final String TEMPLATE_PROCESSING_REQUEST_ENDPOINT = "orders/routing-lists/" + ROUTING_LIST_ID + "/process-template";
private static final String TEMPLATE_PROCESSING_REQUEST_ENDPOINT = "orders/routing-lists/" + ROUTING_LIST_ID + "/template";
private static boolean runningOnOwn;
@Autowired
private RoutingListsService routingListsService;
private RequestContext requestContext;
private Context ctxMock;
private Map<String, String> okapiHeadersMock;
private AutoCloseable mockitoMocks;


@BeforeAll
static void before() throws InterruptedException, ExecutionException, TimeoutException {
Expand All @@ -69,7 +71,7 @@ static void before() throws InterruptedException, ExecutionException, TimeoutExc

@BeforeEach
void beforeEach() {
MockitoAnnotations.openMocks(this);
mockitoMocks = MockitoAnnotations.openMocks(this);
autowireDependencies(this);
ctxMock = getFirstContextFromVertx(getVertx());
okapiHeadersMock = new HashMap<>();
Expand All @@ -81,7 +83,8 @@ void beforeEach() {
}

@AfterEach
void afterEach() {
void afterEach() throws Exception {
mockitoMocks.close();
clearServiceInteractions();
}

Expand Down

0 comments on commit fa557e5

Please sign in to comment.