Closed
Description
Description
NullPointerException when invoking CollectionWrappersKt.constructKeysAndValues
To Reproduce
Steps to reproduce the behavior:
- Run the
UTBotTest
project in IntelliJ Idea - Use plugin to generate tests for
MapOperate
method - 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
Assignees
Labels
Type
Projects
Status
Done