@Test
public void shouldRequestFailOnNotNonceRelatedError() {

  // given
  final TryCountAndInterval tryCountAndInterval = TryCountAndInterval.of(3, Time.of(100L));
  final TxRequester txRequester = new NonceRefreshingTxRequester(tryCountAndInterval,
      new SimpleNonceProvider());
  final AergoKey signer = new AergoKeyGenerator().create();
  final UnsupportedOperationException expected = new UnsupportedOperationException(
      "Not nonce-related error");
  final TxRequestFunction requestFunction = new TxRequestFunction() {
    @Override
    public TxHash apply(Signer signer, Long aLong) {
      throw expected;
    }
  };
  try {
    txRequester.request(mock(AergoClient.class), signer, requestFunction);
    fail("Should throw UnsupportedOperationException");
  } catch (Exception actual) {
    // then
    assertEquals(expected, actual);
  }
}