package cn.quant.baa.pay;

import cn.quant.spring.util.IdentitySequencer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;

import javax.crypto.Cipher;
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset;


/**
 * <p><b>JUnit VM Option:</b><br/>
 * <code>-Dspring.config.file=${project.configure.directory}/target/config/application-dev.properties </code><br/>
 * </p>
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {ServerApplication.class})
@TestPropertySource("classpath:application.properties")
public class TestApplication {

    @Autowired
    private IdentitySequencer identitySequencer;

    @Test
    public void idWorker() {
        try {


            System.currentTimeMillis();
        } catch (Exception e) {

        }

        System.out.println(identitySequencer.nextId());
        System.out.println(identitySequencer.nextId());
        System.out.println(identitySequencer.nextId());
        System.out.println(identitySequencer.nextId());
        System.currentTimeMillis();
        return;
    }
}
