-
Notifications
You must be signed in to change notification settings - Fork 127
2923 zoominfo #3872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
2923 zoominfo #3872
Conversation
| COMPANY_STATE, inputParameters.getString(COMPANY_STATE), | ||
| COMPANY_ZIPCODE, inputParameters.getString(COMPANY_ZIPCODE), | ||
| COMPANY_COUNTRY, inputParameters.getString(COMPANY_COUNTRY))))))) | ||
| .configuration(responseType(ResponseType.JSON)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using Body.of(Object... keyValueArray) or Body.of(String name, Object[] keyValueArray), as these may handle nulls more gracefully.
Please review all your perform methods: when using Map.of(key1, value1, ...), if any key or value is null, it will throw a NullPointerException.
For example, if inputParameters.getList(OUTPUT_FIELDS) or inputParameters.getString(COMPANY_NAME) returns null, the current implementation will fail at runtime.
Update the map creation logic to safely handle possible null values and avoid NPEs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change still does not fully address the issue.
Please review the implementation of Body.of(Object... keyValueArray) and Body.of(String name, Object[] keyValueArray): these methods only add entries where both the key and value are non-null, and they require an even number of elements.
Simply replacing Map.of(...) with object arrays does not guarantee correct structure or adherence to the API specification—especially when the API expects nested maps (e.g., for matchCompanyInput).
To avoid NullPointerException and ensure your payload matches the API documentation, you should manually construct each map, including only those entries whose values are not null. This approach both prevents runtime errors and ensures the request body structure is valid for the API.
| Object result = ZoominfoEnrichCompanyAction.perform(mockedParameters, mockedParameters, mockedContext); | ||
|
|
||
| assertEquals(mockedObject, result); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review the tests for this component and compare them with tests for previously implemented components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marijahorvat171 tests are still not improved
| COMPANY_STATE, inputParameters.getString(COMPANY_STATE), | ||
| COMPANY_ZIPCODE, inputParameters.getString(COMPANY_ZIPCODE), | ||
| COMPANY_COUNTRY, inputParameters.getString(COMPANY_COUNTRY))))))) | ||
| .configuration(responseType(ResponseType.JSON)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change still does not fully address the issue.
Please review the implementation of Body.of(Object... keyValueArray) and Body.of(String name, Object[] keyValueArray): these methods only add entries where both the key and value are non-null, and they require an even number of elements.
Simply replacing Map.of(...) with object arrays does not guarantee correct structure or adherence to the API specification—especially when the API expects nested maps (e.g., for matchCompanyInput).
To avoid NullPointerException and ensure your payload matches the API documentation, you should manually construct each map, including only those entries whose values are not null. This approach both prevents runtime errors and ensures the request body structure is valid for the API.
ebeff02 to
2495622
Compare
|



API can be used only with paid account; component not tested