class PostmanService {

    String toQueryString(KeyValue[] query) {
        if (query == null || query.length == 0) {
            return "";
        }
        return "?" + Arrays.stream(query)
                .map(e -> e.getKey() + "=" + e.getValue())
                .collect(Collectors.joining("&"));
    }

}