static String canonicalQueryString(Map<String, String> attributes) {
        List<String> components = getListOfEntries(attributes);
        Collections.sort(components);
        return canonicalQueryString(components);
    }
@Test
    public void canonicalQueryString() {
        // given
        Map<String, String> attributes = new HashMap<>();
        attributes.put("second-attribute", "second-attribute+value");
        attributes.put("attribute", "attribute+value");
        attributes.put("name", "Name*");

        // when
        String result = AwsRequestUtils.canonicalQueryString(attributes);

        assertEquals("attribute=attribute%2Bvalue&name=Name%2A&second-attribute=second-attribute%2Bvalue", result);
    }