// Path: common-utils/src/main/java/com/stnetix/ariaddna/commonutils/dto/CloudCredentialsDTO.java
// public class CloudCredentialsDTO {
// 
//     public CloudCredentialsDTO() {
//         this.uuid = UUID.randomUUID().toString();
//     }
// 
//     public CloudCredentialsDTO(String clientId, String clientSecret) {
//         this.clientId = clientId;
//         this.clientSecret = clientSecret;
//     }
// 
//     private Long id;
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     private String uuid;
// 
//     public String getUuid() {
//         return uuid;
//     }
// 
//     public void setUuid(String uuid) {
//         this.uuid = uuid;
//     }
// 
//     private String clientId;
// 
//     public String getClientId() {
//         return clientId;
//     }
// 
//     public void setClientId(String clientId) {
//         this.clientId = clientId;
//     }
// 
//     private String clientSecret;
// 
//     public String getClientSecret() {
//         return clientSecret;
//     }
// 
//     public void setClientSecret(String clientSecret) {
//         this.clientSecret = clientSecret;
//     }
// }
// 
// Path: storage-service/src/main/java/com/stnetix/ariaddna/persistence/utils/AppConfiguration.java
// @SpringBootApplication
// @EntityScan("com.stnetix.ariaddna.persistence.entities")
// @Import(JPAConfiguration.class)
// public class AppConfiguration {
// 
//     private static AriaddnaLogger LOGGER = AriaddnaLogger.getLogger(AppConfiguration.class);
// 
//     @PersistenceContext
//     @Qualifier(value = "entityManager")
//     private EntityManager em;
// 
//     @Bean
//     public ICertificateService certificateServiceImpl() {
//         return new CertificateServiceImpl();
//     }
// 
//     @Bean
//     public IKeyStorePasswordService keyStorePasswordServiceImpl() {
//         return new KeyStorePasswordServiceImpl();
//     }
// 
//     @Bean
//     public RepositoryFactorySupport repositoryFactorySupport() {
//         LOGGER.info("In bean repositoryFactorySupport() entity manager is : {}", em.toString());
//         return new JpaRepositoryFactory(em);
//     }
// 
//     @Bean CertificateRepository certificateRepository() {
//         return repositoryFactorySupport().getRepository(CertificateRepository.class);
//     }
// 
//     @Bean
//     public KeyStorePasswordRepository keyStorePasswordRepository() {
//         return repositoryFactorySupport().getRepository(KeyStorePasswordRepository.class);
//     }
// 
//     @Bean
//     public AccessTokenRepository accessTokenRepository() {
//         return repositoryFactorySupport().getRepository(AccessTokenRepository.class);
//     }
// 
//     @Bean
//     public AccessTokenServiceImpl accessTokenServiceImpl() {
//         return new AccessTokenServiceImpl();
//     }
// 
//     @Bean
//     public CloudCredentialsRepository cloudCredentialsRepository() {
//         return repositoryFactorySupport().getRepository(CloudCredentialsRepository.class);
//     }
// 
//     @Bean
//     public CloudCredentialsServiceImpl cloudCredentialsServiceImpl() {
//         return new CloudCredentialsServiceImpl();
//     }
// 
//     @Bean
//     public IMetatableService metatableService() {
//         return new MetatableServiceImpl();
//     }
// 
// }


import java.util.UUID;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;
import com.stnetix.ariaddna.commonutils.dto.CloudCredentialsDTO;
import com.stnetix.ariaddna.persistence.utils.AppConfiguration;
/*
 * Copyright (c) 2017 stnetix.com. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.  You may obtain a copy of
 * the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed
 * under the License is distributed on an "AS IS" BASIS, without warranties or
 * conditions of any kind, EITHER EXPRESS OR IMPLIED.  See the License for the
 * specific language governing permissions and limitations under the License.
 */

package com.stnetix.ariaddna.persistence.services;




@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AppConfiguration.class)
//Transactional mark this test to rollback all changes after test
@Transactional
public class CloudCredentialsServiceImplTest {
    @Autowired
    private ICloudCredentialsService cloudCredentialsService;

    @Test
    public void saveCloudCredentials() {
// Path: common-utils/src/main/java/com/stnetix/ariaddna/commonutils/dto/CloudCredentialsDTO.java
// public class CloudCredentialsDTO {
// 
//     public CloudCredentialsDTO() {
//         this.uuid = UUID.randomUUID().toString();
//     }
// 
//     public CloudCredentialsDTO(String clientId, String clientSecret) {
//         this.clientId = clientId;
//         this.clientSecret = clientSecret;
//     }
// 
//     private Long id;
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     private String uuid;
// 
//     public String getUuid() {
//         return uuid;
//     }
// 
//     public void setUuid(String uuid) {
//         this.uuid = uuid;
//     }
// 
//     private String clientId;
// 
//     public String getClientId() {
//         return clientId;
//     }
// 
//     public void setClientId(String clientId) {
//         this.clientId = clientId;
//     }
// 
//     private String clientSecret;
// 
//     public String getClientSecret() {
//         return clientSecret;
//     }
// 
//     public void setClientSecret(String clientSecret) {
//         this.clientSecret = clientSecret;
//     }
// }
// 
// Path: storage-service/src/main/java/com/stnetix/ariaddna/persistence/utils/AppConfiguration.java
// @SpringBootApplication
// @EntityScan("com.stnetix.ariaddna.persistence.entities")
// @Import(JPAConfiguration.class)
// public class AppConfiguration {
// 
//     private static AriaddnaLogger LOGGER = AriaddnaLogger.getLogger(AppConfiguration.class);
// 
//     @PersistenceContext
//     @Qualifier(value = "entityManager")
//     private EntityManager em;
// 
//     @Bean
//     public ICertificateService certificateServiceImpl() {
//         return new CertificateServiceImpl();
//     }
// 
//     @Bean
//     public IKeyStorePasswordService keyStorePasswordServiceImpl() {
//         return new KeyStorePasswordServiceImpl();
//     }
// 
//     @Bean
//     public RepositoryFactorySupport repositoryFactorySupport() {
//         LOGGER.info("In bean repositoryFactorySupport() entity manager is : {}", em.toString());
//         return new JpaRepositoryFactory(em);
//     }
// 
//     @Bean CertificateRepository certificateRepository() {
//         return repositoryFactorySupport().getRepository(CertificateRepository.class);
//     }
// 
//     @Bean
//     public KeyStorePasswordRepository keyStorePasswordRepository() {
//         return repositoryFactorySupport().getRepository(KeyStorePasswordRepository.class);
//     }
// 
//     @Bean
//     public AccessTokenRepository accessTokenRepository() {
//         return repositoryFactorySupport().getRepository(AccessTokenRepository.class);
//     }
// 
//     @Bean
//     public AccessTokenServiceImpl accessTokenServiceImpl() {
//         return new AccessTokenServiceImpl();
//     }
// 
//     @Bean
//     public CloudCredentialsRepository cloudCredentialsRepository() {
//         return repositoryFactorySupport().getRepository(CloudCredentialsRepository.class);
//     }
// 
//     @Bean
//     public CloudCredentialsServiceImpl cloudCredentialsServiceImpl() {
//         return new CloudCredentialsServiceImpl();
//     }
// 
//     @Bean
//     public IMetatableService metatableService() {
//         return new MetatableServiceImpl();
//     }
// 
// }


// Path: storage-service/src/test/java/com/stnetix/ariaddna/persistence/services/CloudCredentialsServiceImplTest.java
import java.util.UUID;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;
import com.stnetix.ariaddna.commonutils.dto.CloudCredentialsDTO;
import com.stnetix.ariaddna.persistence.utils.AppConfiguration;

/*
 * Copyright (c) 2017 stnetix.com. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.  You may obtain a copy of
 * the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed
 * under the License is distributed on an "AS IS" BASIS, without warranties or
 * conditions of any kind, EITHER EXPRESS OR IMPLIED.  See the License for the
 * specific language governing permissions and limitations under the License.
 */

package com.stnetix.ariaddna.persistence.services;




@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AppConfiguration.class)
//Transactional mark this test to rollback all changes after test
@Transactional
public class CloudCredentialsServiceImplTest {
    @Autowired
    private ICloudCredentialsService cloudCredentialsService;

    @Test
    public void saveCloudCredentials() {
        CloudCredentialsDTO cloudCredentialsDTO = new CloudCredentialsDTO();