@Override
    @SuppressWarnings("checkstyle:innerassignment")
    public boolean equals(Object obj) {
        final BackupTaskStatus that;
        return obj instanceof BackupTaskStatus bts
                && this.completed == (that = bts).completed
                && this.total == that.total
                && this.state == that.state;
    }
@Test
    public void testEquals() {
        assertEquals(backupTaskStatus, backupTaskStatus);
        assertEquals(backupTaskStatus, backupTaskStatusWithSameAttributes);

        assertNotEquals(null, backupTaskStatus);
        assertNotEquals(new Object(), backupTaskStatus);

        assertNotEquals(backupTaskStatus, backupTaskStatusOtherState);
        assertNotEquals(backupTaskStatus, backupTaskStatusOtherCompleted);
        assertNotEquals(backupTaskStatus, backupTaskStatusOtherTotal);
    }