public ControlledFragmentHandler.Action onExtensionMessage(
        final int actingBlockLength,
        final int templateId,
        final int schemaId,
        final int actingVersion,
        final DirectBuffer buffer,
        final int offset,
        final int length,
        final Header header)
    {
        if (null != consensusModuleExtension)
        {
            return consensusModuleExtension.onIngressExtensionMessage(
                actingBlockLength, templateId, schemaId, actingVersion, buffer, offset, length, header);
        }

        throw new ClusterException("expected schemaId=" + MessageHeaderDecoder.SCHEMA_ID + ", actual=" + schemaId);
    }
@Test
    void shouldDelegateHandlingToRegisteredExtension()
    {
        final ConsensusModuleExtension consensusModuleExtension = mock(ConsensusModuleExtension.class, "used adapter");
        when(consensusModuleExtension.supportedSchemaId()).thenReturn(SCHEMA_ID);
        final TestClusterClock clock = new TestClusterClock(TimeUnit.MILLISECONDS);
        ctx.epochClock(clock)
            .clusterClock(clock)
            .consensusModuleExtension(consensusModuleExtension);

        final ConsensusModuleAgent agent = new ConsensusModuleAgent(ctx);
        agent.onExtensionMessage(0, 1, SCHEMA_ID, 0, null, 0, 0, null);

        verify(consensusModuleExtension)
            .onIngressExtensionMessage(0, 1, SCHEMA_ID, 0, null, 0, 0, null);
    }