### Question:
SignatureFinalizerBuilder { public static SignatureFinalizer aFinalizer(Container container, SignatureParameters signatureParameters) { return determineFinalizer( container.getDataFiles(), signatureParameters, container.getConfiguration(), container.getType()); }  static SignatureFinalizer aFinalizer(Container container, SignatureParameters signatureParameters); static SignatureFinalizer aFinalizer(List<DataFile> dataFilesToSign, SignatureParameters signatureParameters, Configuration configuration, Container.DocumentType documentType);  }### Answer:
@Test public void bdocFinalizerFromBdocContainer() { Container container = ContainerBuilder.aContainer(BDOC).build(); SignatureFinalizer signatureFinalizer = SignatureFinalizerBuilder.aFinalizer(container, new SignatureParameters()); assertTrue(signatureFinalizer instanceof BDocSignatureFinalizer); }
@Test public void asiceFinalizerFromAsiceContainer() { Container container = ContainerBuilder.aContainer(ASICE).build(); SignatureFinalizer signatureFinalizer = SignatureFinalizerBuilder.aFinalizer(container, new SignatureParameters()); assertTrue(signatureFinalizer instanceof AsicESignatureFinalizer); }
@Test public void asicFinalizerFromAsicsContainer() { Container container = ContainerBuilder.aContainer(ASICS).build(); SignatureFinalizer signatureFinalizer = SignatureFinalizerBuilder.aFinalizer(container, new SignatureParameters()); assertTrue(signatureFinalizer instanceof AsicSignatureFinalizer); }
@Test(expected = NotSupportedException.class) public void finalizerFromContainer_notSupportedContainerType() { Container container = ContainerBuilder.aContainer(DDOC).build(); SignatureFinalizerBuilder.aFinalizer(container, new SignatureParameters()); }