use of io.nem.symbol.sdk.openapi.vertx.model.AccountInfoDTO in project nem2-sdk-java by nemtech.
the class AccountRepositoryVertxImplTest method shouldProcessExceptionWhenNotFoundInvalidResponse.
@Test
public void shouldProcessExceptionWhenNotFoundInvalidResponse() {
Address address = Address.generateRandom(this.networkType);
AccountDTO accountDTO = new AccountDTO();
accountDTO.setAccountType(AccountTypeEnum.NUMBER_1);
accountDTO.setAddress(encodeAddress(address));
AccountInfoDTO accountInfoDTO = new AccountInfoDTO();
accountInfoDTO.setAccount(accountDTO);
mockErrorCodeRawResponse(400, "I'm a raw error, not json");
Assertions.assertEquals("ApiException: Bad Request - 400 - I'm a raw error, not json", Assertions.assertThrows(RepositoryCallException.class, () -> {
ExceptionUtils.propagate(() -> repository.getAccountInfo(address).toFuture().get());
}).getMessage());
}
Aggregations