@Test public void testPrepareMutationWithNullRelationship(){ MockGraphPersistence graphPersistence = createGraphPersistence(); try{ Relationship relationship = null; graphPersistence.prepareMutation(relationship); fail("Should have thrown with null relationship"); }catch(Exception e){ assertTrue(e instanceof IllegalArgumentException); assertEquals(e.getMessage(), "Parameter \"relationship::com.intuit.ugc.api.Relationship\" cannot be null"); } }
@Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); }
AbstractGraphPersistence implements Persistence { @Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); } }
AbstractGraphPersistence implements Persistence { @Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); } protected  AbstractGraphPersistence(GraphVisitor repository,
            MutationExecutorFactory factory); }
AbstractGraphPersistence implements Persistence { @Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); } protected  AbstractGraphPersistence(GraphVisitor repository,
            MutationExecutorFactory factory); @Override ID allocateID(); @Override Queries.LookupQuery lookup(); @Override Queries.GraphQuery queryGraph(); @Override Entity.Mutation prepareMutation(Entity entity); @Override Relationship.Mutation prepareMutation(Relationship relationship); @Override Predicate predicates(); @Override BatchMutation prepareBatchMutation(); }
AbstractGraphPersistence implements Persistence { @Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); } protected  AbstractGraphPersistence(GraphVisitor repository,
            MutationExecutorFactory factory); @Override ID allocateID(); @Override Queries.LookupQuery lookup(); @Override Queries.GraphQuery queryGraph(); @Override Entity.Mutation prepareMutation(Entity entity); @Override Relationship.Mutation prepareMutation(Relationship relationship); @Override Predicate predicates(); @Override BatchMutation prepareBatchMutation();  }