undefined

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Test Hooks - Part II

To properly test the use of the timestamp, we follow the dependency inversion principle again here and a test hook to set an instance of the Clock abstract class we use for generating the creation timestamp:

import com.google.common.annotations.VisibleForTesting;
import org.easymock.EasyMock;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content