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

    DefaultMethodConfigBuilder toTest = newToTest();
    try {
        toTest.build();
    } catch (Exception e) {
        assertEquals("End-point is mandatory. This is probably due to a missing or empty @EndPoint annotation.\n" +
                "Either provide an @EndPoint annotation or build a CRest instance as follow:\n" +
                "\n" +
                "   String defaultEndPoint = ...;\n" +
                "   CRest crest = CRest.getInstance(defaultEndPoint);\n" +
                "\n" +
                "Location information:\n" +
                "Method[method=public abstract void org.codegist.crest.test.util.TestInterface.m1(java.lang.String,int),interface=Mock for InterfaceConfigBuilder, hashCode: "+interfaceConfigBuilder.hashCode()+"]", e.getMessage());
        throw e;
    }
}