AllFreeStandingExtensions { public void add(List<Extension> extensions) { for (Extension extension : extensions) { add(extension); } } @Autowired  AllFreeStandingExtensions(Validator validator); void add(List<Extension> extensions); void add(Extension extension); List<Extension> getExtensions(); void clear();  }
@Test(expected = IllegalArgumentException.class) public void testAddExtensionFailsWhenExtensionWithIdExists() { allFreeStandingExtensions.add(new Extension("ext1", "app2", "extensionPoint2", "link2", "label2", "url2", 0)); }