### Question:
EncryptedAssertionUnmarshaller { public EncryptedAssertion transform(String assertionString) { EncryptedAssertion assertion = stringAssertionTransformer.apply(assertionString); assertion.detach(); return assertion; } EncryptedAssertionUnmarshaller(StringToOpenSamlObjectTransformer<EncryptedAssertion> stringAssertionTransformer); EncryptedAssertion transform(String assertionString);  }### Answer:
@Test public void shouldCreateAEncryptedAssertionObjectFromAGivenString() throws Exception { EncryptedAssertionUnmarshaller encryptedAssertionUnmarshaller = new EncryptedAssertionUnmarshaller(stringToEncryptedAssertionTransformer); final EncryptedAssertion expected = new EncryptedAssertionBuilder().buildObject(); when(stringToEncryptedAssertionTransformer.apply(ENCRYPTED_ASSERTION_BLOB)).thenReturn(expected); final EncryptedAssertion encryptedAssertion = encryptedAssertionUnmarshaller.transform(ENCRYPTED_ASSERTION_BLOB); assertThat(encryptedAssertion).isEqualTo(expected); }