CertificateServiceImpl implements ICertificateService { @Override @Transactional public CertificateDTO save(CertificateDTO certificateDTO) { Certificate certificate = tranformer.certificateDTOToEntity(certificateDTO); return tranformer.certificateEntityToDTO(repository.save(certificate)); } CertificateServiceImpl(); @Override @Transactional CertificateDTO save(CertificateDTO certificateDTO); @Override void remove(CertificateDTO certificateDTO); @Override List<CertificateDTO> getActiveCertificates(); @Override List<CertificateDTO> getDisableCertificates(); @Override List<CertificateDTO> getAllCertificates();  }
@Test public void saveTest() throws Exception { CertificateDTO certificateDTO = new CertificateDTO(); certificateDTO.setActive(true); UUID uuid = UUID.randomUUID(); certificateDTO.setUuid(uuid.toString()); CertificateDTO savedCertDTO = certificateService.save(certificateDTO); assertNotNull(savedCertDTO); assertNotNull(savedCertDTO.getId()); }