@Test
public void testAddMethodDuplicates() throws Exception {

  assertEquals(0, config.getMethods().size());
  EndpointMethod method1 = getGetDateMethod();
  ApiMethodConfig methodConfig1 = config.getMethods().getOrCreate(method1);
  ApiMethodConfig methodConfig2 = config.getMethods().getOrCreate(method1);
  assertEquals(1, config.getMethods().size());
  assertEquals(methodConfig1, methodConfig2);
  EndpointMethod method2 = getResultNoParamsMethod();
  methodConfig1 = config.getMethods().getOrCreate(method2);
  methodConfig2 = config.getMethods().getOrCreate(method2);
  assertEquals(2, config.getMethods().size());
  assertEquals(methodConfig1, methodConfig2);
}