ActionImportClientQuery extends AbstractODataClientQuery implements ODataActionClientQuery, Serializable { private ActionImportClientQuery(Builder builder) { checkNotNull(builder.returnType, "Action return type should not be null"); checkNotNull(builder.actionName, "Action name should not be null"); setEntityType(builder.returnType); this.actionName = builder.actionName; actionRequestBody = builder.actionParameterMap == null || builder.actionParameterMap.isEmpty() ? "" : "{" + builder.actionParameterMap.entrySet() .stream() .map(entry -> String.format("\"%s\":%s", entry.getKey(), entry.getValue())) .collect(Collectors.joining(",")) + "}"; this.cacheKey = calculateCacheKey(builder); } private  ActionImportClientQuery(Builder builder); @Override String getActionRequestBody(); @Override String getQuery(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override String getCacheKey();  }
@Test public void testActionImportClientQuery() { ODataActionClientQuery actionClientQuery = new ActionImportClientQuery.Builder() .withActionName("SomeCustomAction") .withReturnType(List.class) .withActionParameter("param1", "\"value1\"") .withActionParameter("param2", "\"value2\"") .withActionParameter("param3", "\"value3\"") .build(); assertEquals("{\"param1\":\"value1\",\"param2\":\"value2\",\"param3\":\"value3\"}", actionClientQuery.getActionRequestBody()); assertEquals(List.class, actionClientQuery.getEntityType()); assertEquals("SomeCustomAction", actionClientQuery.getQuery()); }