@Test
public void setSignalSuccessIsTrueWhenSignalWasSet() {

  SetSignalRequest req = new SetSignalRequest();
  req.signal = 42;
  req.reason = "testing";
  when(workflowInstances.setSignal(99, Optional.of(42), "testing", WorkflowActionType.externalChange)).thenReturn(true);
  SetSignalResponse response = resource.setSignal(99, req).readEntity(SetSignalResponse.class);
  verify(workflowInstances).setSignal(99, Optional.of(42), "testing", WorkflowActionType.externalChange);
  assertTrue(response.setSignalSuccess);
}