@Override
    public int hashCode() {
        int result = state != null ? state.hashCode() : 0;
        result = 31 * result + completed;
        result = 31 * result + total;
        return result;
    }
@Test
    public void testHashCode() {
        assertEquals(backupTaskStatus.hashCode(), backupTaskStatus.hashCode());
        assertEquals(backupTaskStatus.hashCode(), backupTaskStatusWithSameAttributes.hashCode());

        assumeDifferentHashCodes();
        assertNotEquals(backupTaskStatus.hashCode(), backupTaskStatusOtherState.hashCode());
        assertNotEquals(backupTaskStatus.hashCode(), backupTaskStatusOtherCompleted.hashCode());
        assertNotEquals(backupTaskStatus.hashCode(), backupTaskStatusOtherTotal.hashCode());
    }