Count query on SuccessFactors entity doesn't work as it requires $top to be greater than 0 but count() method of FluentHelperCount is overriding $top with 0. Hence the SuccessFactors rejecting the call with 400 error.
Here is my code (throws exception):
long count = new UserFluentHelper(QueryUtils.getSFServicePath()).top(1).select(User.USER_ID).count()
.execute(QueryUtils.getSFDestination());
Executed query using Postman with URL generated by count() method
Please point me out if I am doing something wrong when constructing query.
Thanks