void (Integer someValue) { Object object = methodWhichCanReturnNull(someValue); Assertions.assertThat(object).isNotNull(); if (<warning descr="Condition 'object == null' is always 'false'">object == null</warning>) {} }