@Test
  public void testGetPunchOutCredential() {
    when(this.credentialDao.getPunchOutCredential(Mockito.anyString(), Mockito.anyString()))
        .thenReturn(credentialModel);
    final PunchOutCredentialModel punchoutCredentialModel =
        punchoutCredentialService.getPunchOutCredential(
            credential.getDomain(), credential.getIdentity().getContent().get(0).toString());

    assertNotNull(punchoutCredentialModel);
    assertEquals(SHARED_SECRET, punchoutCredentialModel.getSharedsecret());
  }
  private B2BCustomerModel getCustomerFromOrganizations(final List<Organization> organizationList) {
    B2BCustomerModel customer = null;

    for (int i = 0; i < organizationList.size(); i++) {
      final Credential credential = new Credential();
      credential.setDomain(organizationList.get(i).getDomain());
      final Identity identity = new Identity();
      identity.getContent().add(organizationList.get(i).getIdentity());
      credential.setIdentity(identity);

      customer = punchOutCredentialService.getCustomerForCredentialNoAuth(credential);

      if (customer != null) {
        break;
      }
    }
    return customer;
  }