### Question:
SimpleTransactionDataStore implements TransactionDataStore { @Override public HttpTransaction getTransactionWithId(long id) { guardForZeroAndNegativeIndices(id); if (data.containsKey(id)) { return data.get(id); } throw new IndexDoesNotExistException(); } SimpleTransactionDataStore(); @Override void addTransaction(HttpTransaction httpTransaction); @Override boolean updateTransaction(HttpTransaction httpTransaction); @Override boolean removeTransactionWithIndex(long index); @Override int clearAllTransactions(); @Override List<HttpTransaction> getDataList(); @Override HttpTransaction getTransactionWithId(long id); @Override void addDataChangeListener(DataChangeListener dataChangeListener); @Override void removeDataChangeListener(DataChangeListener dataChangeListener);  }### Answer:
@Test public void onFetchTransactionWithZeroTransactionId_shouldThrowZeroIndexException() { assertThatExceptionOfType(TransactionDataStore.ZeroIndexException.class) .isThrownBy(new ThrowableAssert.ThrowingCallable() { @Override public void call() { simpleTransactionDataStore.getTransactionWithId(0); } }) .withNoCause(); }
@Test public void onFetchTransactionWithNegativeTransactionId_shouldThrowNegativeIndexException() { assertThatExceptionOfType(TransactionDataStore.NegativeIndexException.class) .isThrownBy(new ThrowableAssert.ThrowingCallable() { @Override public void call() { simpleTransactionDataStore.getTransactionWithId(-1); } }) .withNoCause(); }