@Test public void getStatus_Created_StatusCreated() throws Exception { mockWebServer.enqueue(TestUtils.generateSuccessMockResponse(this.getClass(), "balance_res_success.json")); int status = getStatus(ACCOUNT_ID); assertThat(status, equalTo(AccountStatus.CREATED)); }
@AccountStatus int getStatus(@NonNull String accountId) throws OperationFailedException { try { getBalance(accountId); return AccountStatus.CREATED; } catch (AccountNotFoundException e) { return AccountStatus.NOT_CREATED; } }
AccountInfoRetriever { @AccountStatus int getStatus(@NonNull String accountId) throws OperationFailedException { try { getBalance(accountId); return AccountStatus.CREATED; } catch (AccountNotFoundException e) { return AccountStatus.NOT_CREATED; } } }
AccountInfoRetriever { @AccountStatus int getStatus(@NonNull String accountId) throws OperationFailedException { try { getBalance(accountId); return AccountStatus.CREATED; } catch (AccountNotFoundException e) { return AccountStatus.NOT_CREATED; } } AccountInfoRetriever(Server server); }
AccountInfoRetriever { @AccountStatus int getStatus(@NonNull String accountId) throws OperationFailedException { try { getBalance(accountId); return AccountStatus.CREATED; } catch (AccountNotFoundException e) { return AccountStatus.NOT_CREATED; } } AccountInfoRetriever(Server server);  }
AccountInfoRetriever { @AccountStatus int getStatus(@NonNull String accountId) throws OperationFailedException { try { getBalance(accountId); return AccountStatus.CREATED; } catch (AccountNotFoundException e) { return AccountStatus.NOT_CREATED; } } AccountInfoRetriever(Server server);   }