final RepositoryTarget target = targets().get(id);
assertThat(target.id(), is(id));
assertThat(target.name(), is(id + "name"));
assertThat(target.contentClass(), is("maven2"));
assertThat(target.patterns(), contains("test1", "test2"));
}
private RepositoryTarget createTarget(final String id, final String... patterns) {
return targets().create(id).withName(id + "name")
.withContentClass("maven2").withPatterns(patterns)