* @see DATAREST-247
*/
@Test
public void executeQueryMethodWithPrimitiveReturnType() throws Exception {
Link profiles = discoverUnique("profiles");
Link profileSearches = discoverUnique(profiles, "search");
Link countByTypeLink = discoverUnique(profileSearches, "countByType");
assertThat(countByTypeLink.isTemplated(), is(true));
assertThat(countByTypeLink.getVariableNames(), hasItem("type"));
MockHttpServletResponse response = request(countByTypeLink.expand("Twitter"));
assertThat(response.getContentAsString(), is("1"));
}