/**
  * Test method for {@link
  * com.taobao.top.sm.DefaultSessionGenerator#generateOneTimeSession(java.lang.String,
  * java.lang.String, java.lang.String, java.lang.String)} .
  */
 @Test
 public void testGenerateOneTimeSession() throws Exception {
   dsg.setCacheClient(cacheClient);
   String oneTimeSession =
       dsg.generateOneTimeSession("all", "tbtest561", "123456", "appsecret", "zhenzi");
   assertEquals('3', oneTimeSession.charAt(0));
 }
 /**
  * sessionCacheClient
  *
  * @throws java.lang.Exception
  */
 @Before
 public void setUp() throws Exception {
   ApplicationContext ctx = new ClassPathXmlApplicationContext("spring-session-test.xml");
   cacheClient = (DefaultDuplicateClient) ctx.getBean("sessionCacheClient");
   dsg.setCacheClient(cacheClient);
 }