use of io.gravitee.cockpit.api.command.bridge.BridgeReply in project gravitee-management-rest-api by gravitee-io.
the class CockpitServiceTest method shouldProcessPromotion.
@Test
public void shouldProcessPromotion() {
BridgeReply reply = new BridgeSimpleReply();
reply.setCommandStatus(CommandStatus.SUCCEEDED);
when(cockpitCommandService.send(any())).thenReturn(reply);
final PromotionEntity promotionEntity = new PromotionEntity();
final CockpitReply<PromotionEntity> result = cockpitService.processPromotion(promotionEntity);
assertThat(result).isNotNull();
assertThat(result.getStatus()).isEqualTo(CockpitReplyStatus.SUCCEEDED);
final PromotionEntity entity = result.getReply();
assertThat(entity).isNotNull();
}
Aggregations