@Test public void testPutNotSerializableKey() throws Exception { OnHeapStore<Serializable, Serializable> store = newStore(); try { store.put( new ArrayList<Object>() { { add(new Object()); } }, "value"); fail(); } catch (CacheAccessException cae) { assertThat(cae.getCause(), instanceOf(SerializerException.class)); } }