@Test
public void shouldOverrideValueForErrorHandler() throws Exception {

    mockEndpoint();
    TestErrorHandler mockTestErrorHandler = mock(TestErrorHandler.class);
    mockStatic(ComponentFactory.class);
    when(ComponentFactory.instantiate(TestErrorHandler.class, mockCRestConfig)).thenReturn(mockTestErrorHandler);
    mockOverride(MethodConfig.METHOD_CONFIG_DEFAULT_ERROR_HANDLER, TestErrorHandler.class);
    DefaultMethodConfigBuilder toTest = newToTest();
    MethodConfig actual = toTest.build();
    assertCommons(actual);
    assertSame(mockTestErrorHandler, actual.getErrorHandler());
}