@Test
public void testRedeploy() {

  // given
  final ContractOperation mockOperation = mock(ContractOperation.class);
  when(mockOperation
      .redeployTx(any(Signer.class), any(ContractAddress.class), any(ContractDefinition.class),
          anyLong(), any(Fee.class)))
      .thenReturn(TxHash.of(BytesValue.EMPTY));
  final AergoClient mockClient = mock(AergoClient.class);
  when(mockClient.getContractOperation()).thenReturn(mockOperation);
  final ClientProvider mockClientProvider = mock(ClientProvider.class);
  when(mockClientProvider.getClient()).thenReturn(mockClient);
  // then
  final AergoKey signer = new AergoKeyGenerator().create();
  final TransactionApi transactionApi = new TransactionApiImpl(mockClientProvider, signer,
      txRequester);
  final TxHash contractTxHash = transactionApi
      .redeploy(anyContractAddress, anyDefinition, anyFee);
  assertNotNull(contractTxHash);
}