@Test
public void setSignalWorksWithUnsupportedSignal() {

  when(workflowInstanceDao.getWorkflowInstanceType(99)).thenReturn("type");
  AbstractWorkflowDefinition<?> definition = mock(AbstractWorkflowDefinition.class);
  doReturn(definition).when(workflowDefinitions).getWorkflowDefinition("type");
  when(definition.getSupportedSignals()).thenReturn(Collections.singletonMap(42, "supported"));
  service.setSignal(99, Optional.of(1), "testing", WorkflowActionType.stateExecution);
  verify(workflowInstanceDao).setSignal(99, Optional.of(1), "testing", WorkflowActionType.stateExecution);
  verify(workflowInstanceDao).getWorkflowInstanceType(99);
  verify(workflowDefinitions).getWorkflowDefinition("type");
}