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