@SuppressWarnings("ConstantConditions") @Test public void getStatus_NullInput_IllegalArgumentException() throws Exception { mockWebServer.enqueue(new MockResponse() .setResponseCode(500) ); expectedEx.expect(IllegalArgumentException.class); AccountInfoRetriever accountInfoRetriever = new AccountInfoRetriever(server); accountInfoRetriever.getStatus(null); }
@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);   }