@Test
void loadFederated() {

    Bundle bundle = new Bundle();
    loader.load(bundle, createFederatedIDPXml(DocumentTools.INSTANCE.getDocumentBuilder().newDocument()));
    assertFalse(bundle.getIdentityProviders().isEmpty());
    assertEquals(1, bundle.getIdentityProviders().size());
    assertNotNull(bundle.getIdentityProviders().get("Test"));
    IdentityProvider entity = bundle.getIdentityProviders().get("Test");
    assertNotNull(entity);
    assertEquals(IdentityProviderType.FEDERATED, entity.getType());
    assertPropertiesContent(ImmutableMap.of(
            "Prop", "Value",
            "Gateway", "7layer"
    ), entity.getProperties());
    assertNotNull(entity.getIdentityProviderDetail());
    assertTrue(entity.getIdentityProviderDetail() instanceof FederatedIdentityProviderDetail);
    FederatedIdentityProviderDetail federatedIdentityProviderDetail = (FederatedIdentityProviderDetail) entity.getIdentityProviderDetail();
    assertFalse(federatedIdentityProviderDetail.getCertificateReferences().isEmpty());
    assertTrue(federatedIdentityProviderDetail.getCertificateReferences().contains(CERT_REF));
    assertEquals(1, federatedIdentityProviderDetail.getCertificateReferences().size());
}