class WorkerRegistryV2 implements WorkerRegistry, WorkerEventSubscriber {

    @Override
    public Optional<Long> getAcceptedAt(WorkerId workerId) {
        if(logger.isDebugEnabled()) {  logger.debug("In getAcceptedAt for worker {}", workerId); }
        Optional<JobId> jId = JobId.fromId(workerId.getJobId());
        if(!jId.isPresent()) {
            return Optional.empty();
        }
        List<IMantisWorkerMetadata> mantisWorkerMetadataList = jobToWorkerInfoMap.get(jId.get());
        if(mantisWorkerMetadataList != null) {

            Optional<IMantisWorkerMetadata> mantisWorkerMetadata = mantisWorkerMetadataList.stream().filter(mData -> mData.getWorkerId().equals(workerId)).findAny();
            if (mantisWorkerMetadata.isPresent()) {
                logger.info("Found worker {} return acceptedAt {}", workerId, mantisWorkerMetadata.get().getAcceptedAt());
                return Optional.of(mantisWorkerMetadata.get().getAcceptedAt());
            }
        }
        return Optional.empty();
    }

      WorkerRegistryV2();

}