content: /**
   * Alipay.com Inc.
   * Copyright (c) 2004-2019 All Rights Reserved.
   */
  package com.alipay.api;
  
  import com.alipay.api.domain.AlipayOpenOperationOpenbizmockBizQueryModel;
  import com.alipay.api.request.AlipayOpenOperationOpenbizmockBizQueryRequest;
  import com.alipay.api.response.AlipayOpenOperationOpenbizmockBizQueryResponse;
  import org.junit.Before;
  import org.junit.Test;
  
  import static org.hamcrest.CoreMatchers.is;
  import static org.hamcrest.MatcherAssert.assertThat;
  
  /**
   * @author junying
   * @version : SM2CertificateExecuteTest.java, v 0.1 2019年12月03日 23:10 junying Exp $
   */
  public class SM2CertificateExecuteTest {
      private AlipayClient client;
  
      @Before
      public void setUp() throws Exception {
          client = new DefaultAlipayClient(TestAccount.DevSM2Cert.SM2_CERT_PARAMS);
      }
  
      //TODO:待相关依赖上线后替换为线上环境测试
      public void should_return_correct_response() throws AlipayApiException {
          //given
          AlipayOpenOperationOpenbizmockBizQueryRequest request = getRequest();
          //when
          AlipayOpenOperationOpenbizmockBizQueryResponse response = client.certificateExecute(request);
          //then
          assertThat(response.isSuccess(), is(true));
          assertThat(response.getCode(), is("10000"));
      }
  
      private AlipayOpenOperationOpenbizmockBizQueryRequest getRequest() {
          AlipayOpenOperationOpenbizmockBizQueryRequest request = new AlipayOpenOperationOpenbizmockBizQueryRequest();
          AlipayOpenOperationOpenbizmockBizQueryModel model = new AlipayOpenOperationOpenbizmockBizQueryModel();
          model.setBizNo("test");
          request.setBizModel(model);
          return request;
      }
  }