class MemcacheClientWrapper extends AbstractMemcacheClientWrapper {

    @Override
    public boolean set(final String key, final int exp, final Object value) throws TimeoutException, CacheException {
        try {
            return memcachedClient.set(key, exp, value);
        } catch (MemcachedException | InterruptedException e) {
            throw new CacheException(e);
        }
    }

}

class MemcacheClientWrapperTest {

    private MemcachedClient client;
    private MemcacheClientWrapper clientWrapper;

    @Test
    @SuppressWarnings("unchecked")
    public void setStringIntTMemcacheTranscoderOfT() throws TimeoutException, InterruptedException, MemcachedException, CacheException {

        CacheTranscoder transcoder = EasyMock.createMock(CacheTranscoder.class);
        EasyMock.expect(client.set(EasyMock.eq("key1"), EasyMock.eq(1), EasyMock.eq("value"), EasyMock.anyObject(Transcoder.class)))
                .andReturn(true);
        EasyMock.replay(client);
        assertTrue(clientWrapper.set("key1", 1, "value", transcoder));
        EasyMock.verify(client);
    }

}