OperationServiceImpl extends BaseServiceImpl<Operation> implements OperationService { @Override public Operation getByName(String name) { BoundStatement stmtGetByName = this.stmtGetByNameInstance.get(); stmtGetByName.setString("name", name); return getSingleRecord(stmtGetByName); }  @Override Operation getByName(String name); @Override Operation getById(UUID id); @Override @Produces @NamedOperation Operation produceOperationByName(InjectionPoint injectionPoint); @Override Setup setup(Operation operation); @Override Setup setup(String operationName);  }
@Test public void nullOnNonExistingOperationByName() { Operation operation = operationService.getByName("random-name"); assertNull("Operation should have been retrieved by name", operation); }