code: public Specification createSpecification(String systemUnderTestName, String repositoryUid, String specificationName) throws GreenPepperServerException
      {
          Specification specification = Specification.newInstance(specificationName);
          Repository repository = repositoryDao.getByUID(repositoryUid);
          if(repository == null)
              throw new GreenPepperServerException(GreenPepperServerErrorKey.REPOSITORY_NOT_FOUND, "Repo not found");
          
          SystemUnderTest sut;
          if(systemUnderTestName != null)
          {
              sut = systemUnderTestDao.getByName(repository.getProject().getName(), systemUnderTestName);
              if(sut == null)
                  throw new GreenPepperServerException(GreenPepperServerErrorKey.SUT_NOT_FOUND, "SystemUnderTest not found");
          }
          else
          {
              sut = repository.getProject().getDefaultSystemUnderTest();
              if(sut == null)
                  throw new GreenPepperServerException(GreenPepperServerErrorKey.PROJECT_DEFAULT_SUT_NOT_FOUND, "Default sut not found");
           }
          
          repository.addSpecification(specification);
          specification.addSystemUnderTest(sut);
          
          if(repository.getContentType().equals(ContentType.REQUIREMENT))
          	repository.setContentType(ContentType.BOTH);
          	
          sessionService.getSession().save(repository);
          
          return specification;
      }
docs: {@inheritDoc}