WorkflowState { public DeployedWorkflow getWorkflowByKey(final long workflowKey) { return workflowPersistenceCache.getWorkflowByKey(workflowKey); } WorkflowState(
      final ZeebeDb<ZbColumnFamilies> zeebeDb,
      final DbContext dbContext,
      final KeyGenerator keyGenerator); int getNextWorkflowVersion(final String bpmnProcessId); boolean putDeployment(final long deploymentKey, final DeploymentRecord deploymentRecord); DeployedWorkflow getWorkflowByProcessIdAndVersion(
      final DirectBuffer bpmnProcessId, final int version); DeployedWorkflow getWorkflowByKey(final long workflowKey); DeployedWorkflow getLatestWorkflowVersionByProcessId(final DirectBuffer bpmnProcessId); Collection<DeployedWorkflow> getWorkflows(); Collection<DeployedWorkflow> getWorkflowsByBpmnProcessId(final DirectBuffer processId); void putLatestVersionDigest(final DirectBuffer processId, final DirectBuffer digest); DirectBuffer getLatestVersionDigest(final DirectBuffer processId); TimerInstanceState getTimerState(); ElementInstanceState getElementInstanceState(); EventScopeInstanceState getEventScopeInstanceState(); T getFlowElement(
      final long workflowKey, final DirectBuffer elementId, final Class<T> elementType);  }
@Test public void shouldReturnNullOnGetWorkflowByKey() { final DeployedWorkflow deployedWorkflow = workflowState.getWorkflowByKey(0); Assertions.assertThat(deployedWorkflow).isNull(); }