/** * @throws Exception If failed. */ @Test public void testPrepend() throws Exception { Assert.assertFalse(client.append(0, "prependKey", "_suffix").get()); jcache().put("prependKey", "prependVal"); Assert.assertTrue(client.append(0, "prependKey", "_suffix").get()); Assert.assertEquals("prependVal_suffix", client.get("prependKey")); assertEquals("prependVal_suffix", jcache().get("prependKey")); }
/** * @throws Exception If failed. */ @Test public void testAppend() throws Exception { Assert.assertFalse(client.append(0, "appendKey", "_suffix").get()); jcache().put("appendKey", "appendVal"); Assert.assertTrue(client.append(0, "appendKey", "_suffix").get()); Assert.assertEquals("appendVal_suffix", client.get("appendKey")); assertEquals("appendVal_suffix", jcache().get("appendKey")); }