Skip to content

Verification of an empty varargs call fails when isNotNull() is used #567

@ChristianSchwarz

Description

@ChristianSchwarz

The follwing tests fail unexpected with : "Argument(s) are different"

@Test
public void shouldMatchVarArgs_isNotNull()   {
    mock.varargs();
    verify(mock).varargs(isNotNull());
}

@Test
public void shouldMatchVarArgs_isNotNullArray()   {
    mock.varargs();

    verify(mock).varargs((String[])isNotNull());
}

Expected is that the tests pass cause an empty vararg array is not null!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions