@Override
    public int hashCode() {
        return executionId.hashCode() + executionState.ordinal();
    }
@Test
    public void testEqualsHashCode() {
        try {
            final ExecutionAttemptID executionId = createExecutionAttemptId();
            final ExecutionState state = ExecutionState.RUNNING;
            final Throwable error = new RuntimeException("some test error message");

            TaskExecutionState s1 = new TaskExecutionState(executionId, state, error);
            TaskExecutionState s2 = new TaskExecutionState(executionId, state, error);

            assertEquals(s1.hashCode(), s2.hashCode());
            assertEquals(s1, s2);
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }