class GitHubUtil {

    public GHMyself getMyself() throws IOException {
        return github.getMyself();
    }

}

class GitHubUtilTest {

    @Test
    public void testGetMyself() throws Exception {

        GitHub github = mock(GitHub.class);
        GHMyself myself = mock(GHMyself.class);
        when(github.getMyself()).thenReturn(myself);
        GitHubUtil gitHubUtil = new GitHubUtil(github);
        assertEquals(gitHubUtil.getMyself(), myself);
    }

}