ServiceResource { @SafeVarargs public final void addResources(final T... resources) { addResources(asList(resources)); }  @SafeVarargs final void addResources(final T... resources); final void addResources(final Collection<T> resources); final Collection<T> getResources();  }
@Test public void addResources() throws Exception { serviceResource.addResources("foo", "bar"); Collection<String> resources = serviceResource.getResources(); assertThat(resources.size(), is(2)); assertThat(serviceResource.getResources(), hasItems("foo", "bar")); }