Fix CheckReturnValue error in OptionalLongSubjectTest
@@ -105,7 +105,10 @@ public class OptionalLongSubjectTest {
@Test
public void hasValueThat_FailingWithEmpty() {
AssertionError expected =
- expectFailure(whenTesting -> whenTesting.that(OptionalLong.empty()).hasValueThat());
+ expectFailure(
+ whenTesting -> {
+ LongSubject unused = whenTesting.that(OptionalLong.empty()).hasValueThat();
+ });
assertThat(expected).hasMessageThat().isEqualTo("Not true that the subject is present");
}
