@Test(expected = IllegalArgumentException.class)
  public void testGetMissingStore() {
    KeyValueStore store = mock(KeyValueStore.class);
    when(keyValueStoreProvider.apply("myStore")).thenReturn(null);
    assertEquals(store, taskContext.getStore("myStore"));
  }
Given that there is not a store corresponding to the storeName, getStore should throw an exception.
samza-core/src/test/java/org/apache/samza/context/TestTaskContextImpl.java