Issue #39: unit tests for cache writer changes.
Issue #39: added return javadoc for write(K, V, V)