X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fservice%2FBasicAuthAccountServiceImplTest.java;h=4409a4fc188f9e316e47271a0a7e3259cc21bbed;hb=aa9b320ff93511280cf51b03d38fb9254af6b530;hp=54347495397006f72c689790350012037d9cca83;hpb=fe3a67c11b65d7989a6ef648c3f34eee8abe7394;p=portal.git diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImplTest.java index 54347495..4409a4fc 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImplTest.java @@ -175,4 +175,17 @@ public class BasicAuthAccountServiceImplTest { basicAuthAccountServiceImpl.deleteEndpointAccout(1l); } + + @Test + public void getBasicAuthCredentialsById() throws Exception{ + List list = new ArrayList<>(); + BasicAuthCredentials basicAuthCredentials = new BasicAuthCredentials(); + basicAuthCredentials.setPassword("password"); + basicAuthCredentials.setId(1l); + list.add(basicAuthCredentials); + Mockito.when((List) dataAccessService.getList(BasicAuthCredentials.class, null)) + .thenReturn(list); + basicAuthAccountServiceImpl.getBasicAuthCredentialsById(1l); + + } }