@Test(expected = CloudbreakApiException.class) public void testNonAllowedFlowInMaintenanceMode() { Stack stack = TestUtil.stack(); stack.setCluster(TestUtil.cluster()); stack.getCluster().setStatus(Status.MAINTENANCE_MODE_ENABLED); when(stackService.getByIdWithTransaction(1L)).thenReturn(stack); BaseFlowEvent baseFlowEvent = new BaseFlowEvent("dontcare", 1L, "crn"); when(eventFactory.createEventWithErrHandler(anyMap(), any(Acceptable.class))) .thenReturn(new Event<Acceptable>(baseFlowEvent)); underTest.notify(1L, "RANDOM", baseFlowEvent, stackService::getByIdWithTransaction); verify(reactor, never()).notify(anyString(), any(Event.class)); }
public FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable) { return notify(stackId, selector, acceptable, stackService::getByIdWithTransaction); }
ReactorNotifier { public FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable) { return notify(stackId, selector, acceptable, stackService::getByIdWithTransaction); } }
ReactorNotifier { public FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable) { return notify(stackId, selector, acceptable, stackService::getByIdWithTransaction); }  }
ReactorNotifier { public FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable) { return notify(stackId, selector, acceptable, stackService::getByIdWithTransaction); }  FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable); FlowIdentifier notifyWithoutCheck(Long stackId, String selector, Acceptable acceptable); FlowIdentifier notify(BaseFlowEvent selectable, Event.Headers headers); FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable, Function<Long, Stack> getStackFn); }
ReactorNotifier { public FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable) { return notify(stackId, selector, acceptable, stackService::getByIdWithTransaction); }  FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable); FlowIdentifier notifyWithoutCheck(Long stackId, String selector, Acceptable acceptable); FlowIdentifier notify(BaseFlowEvent selectable, Event.Headers headers); FlowIdentifier notify(Long stackId, String selector, Acceptable acceptable, Function<Long, Stack> getStackFn);  }