@Test
  public void shouldRetrieveTheSharedSecret() {
    final Header header = (Header) requestXML.getHeaderOrMessageOrRequestOrResponse().get(0);
    final Credential credential = header.getSender().getCredential().iterator().next();

    final String password = punchoutCredentialService.extractSharedSecret(credential);
    assertEquals(SHARED_SECRET, password);
  }
  @Before
  public void setUp() throws FileNotFoundException {
    requestXML = PunchOutUtils.unmarshallCXMLFromFile("b2bpunchout/test/punchoutSetupRequest.xml");
    header = (Header) requestXML.getHeaderOrMessageOrRequestOrResponse().get(0);
    credential = header.getSender().getCredential().iterator().next();

    when(customerModel.getEmail()).thenReturn(DUMMY_EMAIL);
    when(mappingModel.getB2bCustomer()).thenReturn(customerModel);
    when(credentialModel.getB2BCustomerPunchOutCredentialMapping()).thenReturn(mappingModel);
    when(credentialModel.getSharedsecret()).thenReturn(SHARED_SECRET);
    punchoutCredentialService.setCredentialDao(credentialDao);
  }