Better to use an IllegalStateException rather than assertion in setResult.
Assertions are only for cases where you believe the failure of the condition is impossible.
For cases where external code might mistakenly make an incorrect call, throw an exception.