Code example for Stopwatch

public class UpdateLogTest { 
    @Mock UpdateRequest updateRequest; 
    @Mock UpdateContext updateContext; 
    @Mock Update update; 
    Stopwatch stopwatch = new Stopwatch(); 
    @Mock Logger logger; 
    @InjectMocks UpdateLog subject; 
    public void logUpdateResult_create_success() { 
        final RpslObject maintainer = RpslObject.parse("mntner: TST-MNT"); 
        final UpdateResult updateResult = new UpdateResult(maintainer, maintainer, Action.CREATE, UpdateStatus.SUCCESS, new ObjectMessages(), 0, false); 
        when(update.getCredentials()).thenReturn(new Credentials()); 
        subject.logUpdateResult(updateRequest, updateContext, update, stopwatch); 
        verify(logger).info(matches("\\[\\s*0\\] 0[,.]000 ns   UPD CREATE mntner       TST-MNT                        \\(1\\) SUCCESS               : <E0,W0,I0> AUTH  - null")); 
Connect your IDE to all the code out there  Get Codota for Java