SAMLAssertionBuilderFactoryImpl implements SAMLAssertionBuilderFactory { @Override public SAMLAssertionBuilder getBuilder(final String confirmationMethod) { SAMLAssertionBuilder builder = null; if (NhincConstants.HOK_ASSERTION_TYPE.equals(confirmationMethod)) { builder = new HOKSAMLAssertionBuilder(); } else if (NhincConstants.SV_ASSERTION_TYPE.equals(confirmationMethod)) { builder = new SVSAMLAssertionBuilder(); } return builder; }  @Override SAMLAssertionBuilder getBuilder(final String confirmationMethod);  }
@Test public void getBuilderTest() { SAMLAssertionBuilderFactoryImpl builderFactory = new SAMLAssertionBuilderFactoryImpl(); SAMLAssertionBuilder hokBuilder = builderFactory.getBuilder(NhincConstants.HOK_ASSERTION_TYPE); assertTrue(hokBuilder instanceof HOKSAMLAssertionBuilder); SAMLAssertionBuilder svBuilder = builderFactory.getBuilder(NhincConstants.SV_ASSERTION_TYPE); assertTrue(svBuilder instanceof SVSAMLAssertionBuilder); }