Skip to content

NullPointerException: null when invoking CollectionWrappersKt.constructKeysAndValues #107

Closed
@alexeyfridman

Description

@alexeyfridman

Description

NullPointerException when invoking CollectionWrappersKt.constructKeysAndValues

To Reproduce

Steps to reproduce the behavior:

  1. Run the UTBotTest project in IntelliJ Idea
  2. Use plugin to generate tests for MapOperate method
  3. Open the generated test

Expected behavior

Tests are supposed to be generated.

Actual behavior

NullPointerException

Visual proofs (screenshots, logs, images)

Method under test:

public List<String> mapOperator(Map<String, String> map) {
    List<String> result = new ArrayList<>();
    for (Map.Entry<String, String> entry : map.entrySet()) {
        if (entry.getKey().equals("key")) {
            result.add(entry.getValue());
        }
    }
    if (result.size() > 3) {
        return result;
    } else {
        return new ArrayList<>(map.values());
    }
}

Environment

The default one.

Additional context

There is no additional context.

Metadata

Metadata

Labels

comp-symbolic-engineIssue is related to the symbolic execution enginectg-bugIssue is a bugpriority-top-focusTop priority chosen by dev teamspec-release-tailingsFailed to include in the current release, let's include it in the next one

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions