add duration
easymock only in test
add cacheservice
add cache to test
fix test