* @param responseClass expected type of response object
* @return JAX-RS Response
*/
public <T1, T2> T2 postCollection(Object collection, Class<T1> memberClass,
Class<T2> responseClass) {
Response r = doInvoke(HttpMethod.POST, collection, new ParameterizedCollectionType(memberClass),
responseClass, responseClass);
return responseClass.cast(responseClass == Response.class ? r : r.getEntity());
}