public String doGetForText(final String serviceURIpart, final XStreamRepresentation representation,
Matcher<Response> responseMatcher)
throws IOException
{
checkNotNull(serviceURIpart);
Response response = null;
try {
// deliberately passing null for matcher since we do the check after getting the text below.
response = sendMessage(toNexusURL(serviceURIpart), Method.GET, representation, null);
final Representation entity = response.getEntity();
assertThat(entity, notNullValue());
final String responseText = entity.getText();
if (responseMatcher != null) {
assertThat(response, responseMatcher);
}