@@ -0,0 +1,3573 @@
+/**%0A * Copyright (c) 2013-2015, jcabi.com%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions%0A * are met: 1) Redistributions of source code must retain the above%0A * copyright notice, this list of conditions and the following%0A * disclaimer. 2) Redistributions in binary form must reproduce the above%0A * copyright notice, this list of conditions and the following%0A * disclaimer in the documentation and/or other materials provided%0A * with the distribution. 3) Neither the name of the jcabi.com nor%0A * the names of its contributors may be used to endorse or promote%0A * products derived from this software without specific prior written%0A * permission.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT%0A * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND%0A * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL%0A * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,%0A * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES%0A * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR%0A * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)%0A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,%0A * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)%0A * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED%0A * OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0Apackage com.jcabi.github;%0A%0Aimport com.jcabi.github.mock.MkGithub;%0Aimport java.io.IOException;%0Aimport javax.json.Json;%0Aimport org.hamcrest.MatcherAssert;%0Aimport org.hamcrest.Matchers;%0Aimport org.junit.Test;%0A%0A/**%0A * Test case for %7B@link RtStatus%7D.%0A * @author Chris Rebert (github@chrisrebert.com)%0A * @version $Id$%0A * @since 0.24%0A */%0Apublic final class RtStatusTest %7B%0A    /**%0A     * RtStatus can fetch its ID number.%0A     * @throws IOException If there is an I/O problem.%0A     */%0A    @Test%0A    public void fetchesId() throws IOException %7B%0A        final int ident = 666;%0A        MatcherAssert.assertThat(%0A            new RtStatus(%0A                RtStatusTest.commit(),%0A                Json.createObjectBuilder().add(%22id%22, ident).build()%0A            ).identifier(),%0A            Matchers.equalTo(ident)%0A        );%0A    %7D%0A%0A    /**%0A     * RtStatus can fetch its URL.%0A     * @throws IOException If there is an I/O problem.%0A     */%0A    @Test%0A    public void fetchesUrl() throws IOException %7B%0A        final String url = %22http://api.jcabi-github.invalid/whatever%22;%0A        MatcherAssert.assertThat(%0A            new RtStatus(%0A                RtStatusTest.commit(),%0A                Json.createObjectBuilder().add(%22url%22, url).build()%0A            ).url(),%0A            Matchers.equalTo(url)%0A        );%0A    %7D%0A%0A    /**%0A     * RtStatus can fetch its associated commit.%0A     * @throws IOException If there is an I/O problem.%0A     */%0A    @Test%0A    public void fetchesCommit() throws IOException %7B%0A        final Commit cmmt = RtStatusTest.commit();%0A        MatcherAssert.assertThat(%0A            new RtStatus(cmmt, Json.createObjectBuilder().build()).commit(),%0A            Matchers.equalTo(cmmt)%0A        );%0A    %7D%0A%0A    /**%0A     * Returns a test commit to work with.%0A     * @return Commit%0A     * @throws IOException If there is an I/O problem.%0A     */%0A    private static Commit commit() throws IOException %7B%0A        return new MkGithub().randomRepo().git().commits()%0A            .get(%22d288364af5028c72e2a2c91c29343bae11fffcbe%22);%0A    %7D%0A%7D%0A

add tests for RtStatus