TruthConstantAsserts
Truth Library assert is called on a constant.

Severity
WARNING
Tags
FragileCode

The problem

The arguments to assertThat method is a constant. It should be a variable or a method invocation. For eg. switch assertThat(1).isEqualTo(methodCall()) to assertThat(methodCall()).isEqualTo(1).

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("TruthConstantAsserts") to the enclosing element.