### Question:
MacroBlockSignatureVerifier implements BlockSignatureVerifier { @Override public CMSSignedDataVerified verify(byte[] signature, Block block, CertificateProvider certificateProvider) throws GeneralSecurityException, IOException { if (!isSupported(block)) { throw new IllegalArgumentException("Unsupported block [" + block.getClass().getName() + "]."); } return verifier.verify(signature, dumper.dump(block), certificateProvider); }  @Override CMSSignedDataVerified verify(byte[] signature, Block block, CertificateProvider certificateProvider); @Override boolean isSupported(Block block);  }### Answer:
@Test public void testMacroBlockSignatureVerification() throws Exception { assertThat(verifier.verify(BLOCK_SIGNATURE, MACRO_BLOCK, CERT_PROVIDER), equalTo(VERIFIED)); }
@Test public void testMacroMarkerBlockSignatureVerification() throws Exception { assertThat(verifier.verify(BLOCK_SIGNATURE, MARKER_BLOCK, CERT_PROVIDER), equalTo(VERIFIED)); }
@Test public void testIncompatibleBlockVerification() throws Exception { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Unsupported block [org.xwiki.rendering.block.WordBlock]."); assertThat(verifier.verify(BLOCK_SIGNATURE, new WordBlock("macro"), CERT_PROVIDER), equalTo(VERIFIED)); }