There is a need to check that the object in the array, which initially was null, was assigned a value.
There is a method confirming that the value is null
assertThat(result, is(nullValue())); And tell me an analogue with the opposite meaning
assertThat(result, is( НЕ nullValue())); That is, it does not matter what the result is, the main thing is not null without having to specify what exactly is there.
assertThat(result, !is(nullValue()));? In general, like checking for null:assertThat(null, is(nullValue()));not null:assertThat("a", is(notNullValue()));- Alexey Shimanskynot()helper if memory serves - etki