Without seeing your code and your tests I can't say with 100% confidence but it looks like Jacoco is working fine and there are cases not covered there.
You're using the !! 3 times. When you use this operator, in reality, you're creating 2 flows, for when the variable is null and another for not-null. If you add tests for the cases where the variables are null, you should reach 100% coverage.
Just to make explicit, if you would handle your nullable with safe calls, you would have something like this:
val token = authResult.user?.let {
authenticationDataSource.getIdToken(true, it)
?.let { it.token }
?: throw GetIdTokenResultIsNullException()
} ?: throw UserIsNullException()
token?.let {
authenticationDataSource.loginBy(AuthenticationPayload(it))
} ?: throw TokenIsNullException()
Wherever, I'm throwing exceptions you should handle that case as desired, and this is the alternate branch that is created by the nullability.
If you're sure that your values won't be null then you should change your types to make it clear and avoid extra checks.
On a side note, jacoco-android
doesn't seem to be maintained anymore here and it's not compatible with newer gradle
versions, so I would recommend using Jacoco directly. Migrating from jacoco-android
to jacoco
shouldn't be that hard.