### Question:
UpdateSingleCacheAdvice extends CacheBase { protected String getObjectId(final int keyIndex, final Object returnValue, final JoinPoint jp, final Method methodToCache) throws Exception { final Object keyObject = keyIndex == -1 ? validateReturnValueAsKeyObject(returnValue, methodToCache) : getIndexObject(keyIndex, jp, methodToCache); final Method keyMethod = getKeyMethod(keyObject); return generateObjectId(keyMethod, keyObject); }  @Pointcut("@annotation(net.nelz.simplesm.api.UpdateSingleCache)") void updateSingle(); @AfterReturning(pointcut="updateSingle()", returning="retVal") Object cacheUpdateSingle(final JoinPoint jp, final Object retVal);  }### Answer:
@Test public void testGetObjectId() throws Exception { final String key = "Key-" + System.currentTimeMillis(); final KeyObject obj = new KeyObject(); obj.setKey(key); final String result = cut.getObjectId(-1, obj, null, null); assertEquals(key, result); }