class EnrollmentServiceImpl implements EnrollmentService, LocalDhisRepositoryPersistCallback<Enrollment> {

    @HystrixCommand( ignoreExceptions = UnauthorizedException.class )
    @Nonnull
    @Override
    @Cacheable( key = "{'findLatestActive', #a0, #a1}", condition = "#a2 == false", cacheManager = "dhisCacheManager", cacheNames = "enrollments" )
    public Optional<Enrollment> findLatestActive( @Nonnull String programId, @Nonnull String trackedEntityInstanceId, boolean localOnly )
    {
        return findLatestActiveRefreshed( programId, trackedEntityInstanceId, localOnly );
    }

    @Autowired public  EnrollmentServiceImpl( @Nonnull @Qualifier( "userDhis2RestTemplate" ) RestTemplate restTemplate, @Nonnull EventService eventService, @Nonnull RequestCacheService requestCacheService );

}