### Question:
IbftQueryServiceImpl extends PoaQueryServiceImpl implements IbftQueryService { @Override public int getRoundNumberFrom(final org.hyperledger.besu.plugin.data.BlockHeader header) { final BlockHeader headerFromChain = getHeaderFromChain(header); final IbftExtraData extraData = IbftExtraData.decode(headerFromChain); return extraData.getRound(); } 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 roundNumberFromBlockIsReturned() { final IbftQueryService service = new IbftQueryServiceImpl(new IbftBlockInterface(), blockchain, null); assertThat(service.getRoundNumberFrom(blockHeader)).isEqualTo(ROUND_NUMBER_IN_BLOCK); }
@Test public void getRoundNumberThrowsIfBlockIsNotOnTheChain() { 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.getRoundNumberFrom(header)); }