@Test
public void buildShouldBuildEveryMethodConfigAndReturnAnInterfaceConfigWithThem() throws Exception {

    DefaultInterfaceConfig expected = mock(DefaultInterfaceConfig.class);
    MethodConfig mockMethodConfigM1 = mock(MethodConfig.class);
    MethodConfig mockMethodConfigM2 = mock(MethodConfig.class);
    Map<Method, MethodConfig> expectedMethodConfigs = new HashMap<Method, MethodConfig>();
    expectedMethodConfigs.put(M1, mockMethodConfigM1);
    expectedMethodConfigs.put(M2, mockMethodConfigM2);
    when(mockM1MethodConfigBuilder.build()).thenReturn(mockMethodConfigM1);
    when(mockM2MethodConfigBuilder.build()).thenReturn(mockMethodConfigM2);
    whenNew(DefaultInterfaceConfig.class).withArguments( interfaze, expectedMethodConfigs).thenReturn(expected);
    InterfaceConfig actual = toTest.build();
    assertSame(expected, actual);
}