Does anyone know if the DW Assertions Function haveKey is expected to validate a key pair with the key value being null? It seems MUnit fails the assertion if the value is null as shown below:
Expected: to contain key carelineId
Actual: {
carelineId: null
}
at org.mule.munit.assertion.internal.AssertModule.assertMatcherResult(AssertModule.java:77
Pretty clear that the key is there, but its value is null. Thanks!
Edit:
The input is a Transform Message set variable:
%dw 2.0 output application/java
import * from dw::test::Asserts
---
{
carelineId: null
}
and the expression is:
import * from dw::test::Asserts
---
vars.theInput must haveKey('carelineId')