### Question:
IbftQueryServiceImpl extends PoaQueryServiceImpl implements IbftQueryService { @Override public Collection<Address> getSignersFrom( final org.hyperledger.besu.plugin.data.BlockHeader header) { final BlockHeader headerFromChain = getHeaderFromChain(header); final IbftExtraData extraData = IbftExtraData.decode(headerFromChain); return Collections.unmodifiableList( IbftBlockHashing.recoverCommitterAddresses(headerFromChain, extraData)); } IbftQueryServiceImpl(
      final BlockInterface blockInterface, final Blockchain blockchain, final NodeKey nodeKey); @Override int getRoundNumberFrom(final org.hyperledger.besu.plugin.data.BlockHeader header); @Override Collection<Address> getSignersFrom(
      final org.hyperledger.besu.plugin.data.BlockHeader header);  }### Answer:
@Test public void getSignersReturnsAddressesOfSignersInBlock() { final IbftQueryService service = new IbftQueryServiceImpl(new IbftBlockInterface(), blockchain, null); final List<Address> signers = signingKeys.stream() .map(nodeKey -> Util.publicKeyToAddress(nodeKey.getPublicKey())) .collect(Collectors.toList()); assertThat(service.getSignersFrom(blockHeader)).containsExactlyElementsOf(signers); }
@Test public void getSignersThrowsIfBlockIsNotOnTheChain() { final NonBesuBlockHeader header = new NonBesuBlockHeader(blockHeader.getHash(), blockHeader.getExtraData()); when(blockchain.getBlockHeader(blockHeader.getHash())).thenReturn(Optional.empty()); final IbftQueryService service = new IbftQueryServiceImpl(new IbftBlockInterface(), blockchain, null); assertThatExceptionOfType(RuntimeException.class) .isThrownBy(() -> service.getSignersFrom(header)); }