class SignProtocol {

    public DoSignInfo signIn() throws BiliLiveException {
        DoSignInfo doSignInfo = httpHelper.getBiliLiveJSON(DO_SIGN_IN_G, DoSignInfo.class, EXCEPTION_SIGN);
        if (doSignInfo.getCode() == -101) throw new NotLoggedInException();
        return doSignInfo;
    }

}

class SignProtocolTest {

    @Test
    public void signIn() throws Exception {

        SignProtocol signProtocol = new SignProtocol(TestSessionHelper.initSession());
        SignProtocol.SignInfo signInfo = signProtocol.getCurrentSignInfo();
        if (signInfo.isSignedIn()) fail();

        System.out.println(signProtocol.signIn());
    }

}