### Question:
GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } GraphLookUpQuery(final GraphVisitor repository); @Override Queries.Projection entities(Entity.ID... entityIDs); @Override Queries.Projection entity(Entity.ID entityID); @Override ValueSpecifier<Projection> entityBy(Name name);  }### Answer:
@Test public void testEntityWithNullInput(){ GraphVisitor repository = new MockGraphVisitor(); GraphLookUpQuery graphLookupQuery = new GraphLookUpQuery(repository); try{ graphLookupQuery.entity(null); fail("Should have thrown with null entities"); }catch(Exception e){ assertTrue(e instanceof IllegalArgumentException); assertEquals(e.getMessage(), "Parameter \"entityID\" cannot be null"); } }
@Test public void testEntityWithValidArgument(){ Entity.ID newEntityID = Entity.ID.valueOf("urn:entity:" + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "." + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "/" + UUID.randomUUID()); GraphVisitor repository = new MockGraphVisitor(); GraphLookUpQuery graphLookupQuery = new GraphLookUpQuery(repository); Projection entity = graphLookupQuery.entity(newEntityID); assertNotNull(entity); }