@Test(expected=IllegalStateException.class)
public void shouldUseDefaultValueForName() throws Exception {

    DefaultParamConfigBuilder toTest = newToTest();
    try {
        toTest.build();
    } catch (Exception e) {
        assertEquals("Parameter name is mandatory. This is probably due to a missing or empty named param annotation (one of the following: @CookieParam, @FormParam, @HeaderParam, @MatrixParam, @MultiPartParam, @PathParam, @QueryParam).\n" +
                "Location information:\n" +
                "Param[class=interface java.lang.Comparable,type=QUERY,method="+methodConfigBuilder+"]", e.getMessage());
        throw e;
    }
}