<commit_before>package RocketChatAPI.RocketChatTest;

import RocketChatAPI.RocketChatTest.ChatParent.RocketChatParent;
import io.rocketchat.common.data.model.ErrorObject;
import io.rocketchat.core.model.TokenObject;
import org.junit.After;
import org.junit.Before;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;

/**
 * Created by sachin on 3/8/17.
 */
public class ListCustomEmojiTest extends RocketChatParent{

    String username="testuserrocks";
    String password="<PASSWORD>";

    @Captor
    ArgumentCaptor<ErrorObject> errorArgumentCaptor;

    @Before
    public void setUp() {
        super.setUpBefore(true);
    }

    @Override
    public void onConnect(String sessionID) {
        System.out.println("Connected successfully");
        api.login(username,password,this);
    }

    @Override
    public void onLogin(TokenObject token, ErrorObject error) {

    }

    @After
    public void logout(){
        api.logout(null);
    }
}<commit_msg>added test for getting custom emoji from server<commit_after>package RocketChatAPI.RocketChatTest;

import RocketChatAPI.RocketChatTest.ChatParent.RocketChatParent;
import io.rocketchat.common.data.model.ErrorObject;
import io.rocketchat.core.callback.EmojiListener;
import io.rocketchat.core.model.Emoji;
import io.rocketchat.core.model.TokenObject;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.Mockito;

import java.util.ArrayList;

import static org.mockito.Mockito.timeout;

/**
 * Created by sachin on 3/8/17.
 */
public class ListCustomEmojiTest extends RocketChatParent{

    String username="testuserrocks";
    String password="<PASSWORD>";

    @Mock
    EmojiListener listener;

    @Captor
    ArgumentCaptor <ArrayList <Emoji >> listArgumentCaptor;
    @Captor
    ArgumentCaptor<ErrorObject> errorArgumentCaptor;

    @Before
    public void setUp() {
        super.setUpBefore(true);
    }

    @Override
    public void onConnect(String sessionID) {
        System.out.println("Connected successfully");
        api.login(username,password,this);
    }

    @Override
    public void onLogin(TokenObject token, ErrorObject error) {
        api.listCustomEmoji(listener);
    }

    @Test
    public void listCustomEmojiTest(){
        Mockito.verify(listener, timeout(12000).atLeastOnce()).onListCustomEmoji(listArgumentCaptor.capture(),errorArgumentCaptor.capture());
        Assert.assertNotNull(listArgumentCaptor.getValue());
        Assert.assertNull(errorArgumentCaptor.getValue());
        Assert.assertTrue(listArgumentCaptor.getValue().size()>0);
    }

    @After
    public void logout(){
        api.logout(null);
    }
}
{'fraction_non_alphanumeric': 0.10384477182896155, 'fraction_numerical': 0.005030542579949695, 'mean_word_length': 3.9537366548042705, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4940566', 'n_tokens_mistral': 857, 'n_tokens_neox': 844, 'n_words': 158}