package tw.com.mitake.sms;

import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import tw.com.mitake.sms.result.MitakeSmsQueryAccountPointResult;
import tw.com.mitake.sms.result.MitakeSmsQueryMessageStatusResult;

import static org.junit.Assert.assertNotNull;

public class SmsQueryTest {
    private static final Logger LOG = LoggerFactory.getLogger(SmsQueryTest.class);

    @Before
    public void setUp() {
        MitakeSms.init(System.getenv("MITAKE_SMS_USERNAME"), System.getenv("MITAKE_SMS_PASSWORD"));
    }

    @Test
    public void testGetAccountPoint() {
        MitakeSmsQueryAccountPointResult result = MitakeSms.queryAccountPoint();

        System.out.println("result: " + result.toString());

        assertNotNull(result);
    }

    @Test
    public void testGetMessageStatus() {
        // because server-side limits 1 req/s
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            LOG.error(e.getMessage());
        }

        MitakeSmsQueryMessageStatusResult result = MitakeSms.queryMessageStatus("messageid");

        System.out.println("result: " + result.toString());

        assertNotNull(result);
    }
}
@@ -610,24 +610,209 @@
 ntPoint() %7B%0A
+        // because server-side limits 1 req/s%0A        try %7B%0A            Thread.sleep(1000);%0A        %7D catch (InterruptedException e) %7B%0A            LOG.error(e.getMessage());%0A        %7D%0A%0A
         Mita

Add limitation