}
@Test
public void testRepositoryStyle2IsCreatedCorrectly() {
GraphDatabase database = container.getInstance(GraphDatabase.class);
RepositoryClient client = container.getInstance(RepositoryClient.class);
CdiPersonRepository2 repository = client.repository2;
assertThat(repository, is(notNullValue()));
Person person = null;
Person result = null;
try (Transaction tx = database.beginTx()) {
repository.deleteAll();
person = new Person("Simon", 28);
result = repository.save(person);
tx.success();
}
try (Transaction tx = database.beginTx()) {
assertThat(result, is(notNullValue()));
Long resultId = result.getId();
Person lookedUpPerson = repository.findOne(person.getId());
assertThat(lookedUpPerson.getId(), is(resultId));
tx.success();