Suppose instead of MediaEntry, I want too add a generic object type. Because MediaEntry could be a different class reside in different project and I cant use that object dependency in my code. How could I invoke exchange for such situation?
ResponseEntity<MediaEntry> result = getRestTemplate().exchange(uri, HttpMethod.POST, httpEntity,
                    new ParameterizedTypeReference<MediaEntry>() {
                    }, userId);
