class RedisService {

    public long getCurrentVersion() {
        Object obj = this.redisTemplate.opsForValue().get(Constant.TRUNK_VERSIONS);
        return null == obj ? 0L : Long.valueOf(obj.toString());
    }

}

class TestRedisService  {

    @Test
    public void testCurrentVersion() {

        System.out.println(this.redisService.getCurrentVersion());
    }

}