WorkflowInstance { public static WorkflowInstance parseKey(String key) { final int lastHashPos = key.lastIndexOf('#'); if (lastHashPos < 1) { throw new IllegalArgumentException("Key must contain a hash '#' sign on position > 0"); } final WorkflowId workflowId = WorkflowId.parseKey(key.substring(0, lastHashPos)); return create(workflowId, key.substring(lastHashPos + 1)); }  @JsonProperty abstract WorkflowId workflowId(); @JsonProperty abstract String parameter(); String toKey(); @JsonCreator static WorkflowInstance create(
      @JsonProperty("workflow_id") WorkflowId workflowId,
      @JsonProperty("parameter") String parameter); static WorkflowInstance parseKey(String key); @Override String toString(); static final Comparator<WorkflowInstance> KEY_COMPARATOR; }
@Test public void parseKey() { assertThat(WorkflowInstance.parseKey(WORKFLOW_INSTANCE.toKey()), is(WORKFLOW_INSTANCE)); }