public Map<String, String> getLabels() {
    return Collections.unmodifiableMap(labelsMetadata);
  }
@Test
  public void testLabelsAndNameAreExtracted() {
    String stateName = "myState";
    HashMap<String, String> labelsMetadata = new HashMap<String, String>();
    labelsMetadata.put("k1", "v1");
    labelsMetadata.put("k2", "v2");
    SimpleExecutionState testObject = new SimpleExecutionState(stateName, null, labelsMetadata);

    assertEquals(testObject.getStateName(), stateName);
    assertEquals(2, testObject.getLabels().size());
    assertThat(testObject.getLabels(), hasEntry("k1", "v1"));
    assertThat(testObject.getLabels(), hasEntry("k2", "v2"));
  }