### Question:
JavaxCache implements Cache { @Override public void put(String key, String value) throws CacheException { try { store.put(key, value); } catch (Exception e) { throw new CacheException("Cache error on put!", e); } } JavaxCache(javax.cache.Cache<String, String> store); @Override String get(String key); @Override void put(String key, String value);  }### Answer:
@Test public void putCallsJavaxCachePut() throws Exception { cache.put("key", "value"); verify(javaxCache).put("key", "value"); }
@Test public void putRaisesCacheExceptionOnException() throws Exception { Throwable cause = new javax.cache.CacheException(); doThrow(cause).when(javaxCache).put(anyString(), anyString()); thrown.expect(CacheException.class); thrown.expectCause(is(cause)); cache.put("", ""); }