// Path: src/test/java/com/gikk/twirk/TestBiConsumer.java
// public class TestBiConsumer<T, U> {
//     private BiFunction<T,U, Boolean> test;
//     private TestResult res;
// 
//     public TestResult assign(BiFunction<T, U, Boolean> test){
//         this.test = test;
//         return res = new TestResult();
//     }
// 
//     public void consume(T t, U u){
//         if(test != null) {
//             res.complete(test.apply(t, u));
//         }
//     }
// }
// 
// Path: src/test/java/com/gikk/twirk/TestResult.java
// public class TestResult {
//     CompletableFuture<Boolean> res = new CompletableFuture<>();
// 
//     TestResult(){ }
// 
//     void complete(boolean result){
//         res.complete(result);
//     }
// 
//     public boolean await() throws Exception {
//         return res.get(TestSuit.WAIT_TIME, TestSuit.UNIT);
//     }
// }
// 
// Path: src/main/java/com/gikk/twirk/types/users/TwitchUser.java
// public interface TwitchUser {
// 
//     /**Retrieves this user's user name. This is the name the user logs in to
//      * Twitch with
// 	 *
// 	 * @return The user's user name
// 	 */
// 	public String getUserName();
// 
// 	/**Retrieves this user's display name, as displayed in Twitch chat
// 	 *
// 	 * @return The user's display name
// 	 */
// 	public String getDisplayName();
// 
//     /**Retrieves info whether this user is the owner of this channel or not
// 	 *
// 	 * @return {@code true} if the user is the owner, {@code false} if not
// 	 */
//     public boolean isOwner();
// 
// 	/**Retrieves info whether this user is a mod in this channel or not
// 	 *
// 	 * @return {@code true} if the user is mod, {@code false} if not
// 	 */
// 	public boolean isMod();
// 
// 	/**Retrieves info whether this user has turbo or not
// 	 *
// 	 * @return {@code true} if the user has turbo, {@code false} if not
// 	 */
// 	public boolean isTurbo();
// 
// 	/**Retrieves info whether this user is a sub to this channel or not
// 	 *
// 	 * @return {@code true} if the user is a sub, {@code false} if not
// 	 */
// 	public boolean isSub();
// 
// 	/**Retrieves this users {@link USER_TYPE} <br>
// 	 * There are seven USER_TYPEs: OWNER, MOD, GLOBAL_MOD, ADMIN, STAFF, SUBSCRIBER and DEFAULT.
// 	 *
// 	 * @return The user's USER_TYPE
// 	 */
// 	public USER_TYPE getUserType();
// 
// 	/**Retrieves this users display color, as seen in Twitch chat.<br>
// 	 * The color is a hexadecimal number.
// 	 *
// 	 * @return The users display color, as a hex number
// 	 */
// 	public int getColor();
// 
// 	/**Retrieves the users set of badges in Twitch chat. A badge looks like this: <br>
// 	 * {@code broadcaster/1} <br><br>
// 	 *
// 	 * There are several different badges, such as {@code broadcaster/1}, {@code turbo/1} and so on. I do
// 	 * not know all of them explicitly, or what to do with them.
// 	 *
// 	 * TODO: Find out more about badges
// 	 *
// 	 * @return Arrays of strings, representing this users badges. Might be empty if user has none.
// 	 */
// 	public String[] getBadges();
// 
// 	/**Retrieves this user's unique user ID. This ID is decided by Twitch, and will
// 	 * always be the same for the same user
// 	 *
// 	 * @return The users unique user ID
// 	 */
// 	public long getUserID();
// }


import com.gikk.twirk.TestBiConsumer;
import com.gikk.twirk.TestResult;
import com.gikk.twirk.types.users.TwitchUser;
import java.util.function.Consumer;
import static org.junit.Assert.*;
package com.gikk.twirk.types.twitchMessage;


public class TestMessage {
    final static String USER_MESSAGE_NO_EMOTE = "@badges=;color=;display-name=Gikkman;emotes=;mod=0;room-id=31974228;subscriber=0;turbo=0;user-id=27658385;user-type= :gikkman!gikkman@gikkman.tmi.twitch.tv PRIVMSG #gikkman :userMessage 조선말";
    final static String USER_MESSAGE_WITH_EMOTE = "@badges=;color=#FF69B4;display-name=Gikklol;emotes=86:10-19;mod=0;room-id=31974228;subscriber=0;turbo=0;user-id=27658385;user-type= :gikklol!gikklol@gikklol.tmi.twitch.tv PRIVMSG #gikkman :beefin it BibleThump";

    public static void testPrivMsg(Consumer<String> twirkInput, TestBiConsumer<TwitchUser, TwitchMessage> test ) throws Exception{
        TestResult t1 = test.assign(TestMessage::testUserMessageNoEmote);
        twirkInput.accept(USER_MESSAGE_NO_EMOTE);
        t1.await();

// Path: src/test/java/com/gikk/twirk/TestBiConsumer.java
// public class TestBiConsumer<T, U> {
//     private BiFunction<T,U, Boolean> test;
//     private TestResult res;
// 
//     public TestResult assign(BiFunction<T, U, Boolean> test){
//         this.test = test;
//         return res = new TestResult();
//     }
// 
//     public void consume(T t, U u){
//         if(test != null) {
//             res.complete(test.apply(t, u));
//         }
//     }
// }
// 
// Path: src/test/java/com/gikk/twirk/TestResult.java
// public class TestResult {
//     CompletableFuture<Boolean> res = new CompletableFuture<>();
// 
//     TestResult(){ }
// 
//     void complete(boolean result){
//         res.complete(result);
//     }
// 
//     public boolean await() throws Exception {
//         return res.get(TestSuit.WAIT_TIME, TestSuit.UNIT);
//     }
// }
// 
// Path: src/main/java/com/gikk/twirk/types/users/TwitchUser.java
// public interface TwitchUser {
// 
//     /**Retrieves this user's user name. This is the name the user logs in to
//      * Twitch with
// 	 *
// 	 * @return The user's user name
// 	 */
// 	public String getUserName();
// 
// 	/**Retrieves this user's display name, as displayed in Twitch chat
// 	 *
// 	 * @return The user's display name
// 	 */
// 	public String getDisplayName();
// 
//     /**Retrieves info whether this user is the owner of this channel or not
// 	 *
// 	 * @return {@code true} if the user is the owner, {@code false} if not
// 	 */
//     public boolean isOwner();
// 
// 	/**Retrieves info whether this user is a mod in this channel or not
// 	 *
// 	 * @return {@code true} if the user is mod, {@code false} if not
// 	 */
// 	public boolean isMod();
// 
// 	/**Retrieves info whether this user has turbo or not
// 	 *
// 	 * @return {@code true} if the user has turbo, {@code false} if not
// 	 */
// 	public boolean isTurbo();
// 
// 	/**Retrieves info whether this user is a sub to this channel or not
// 	 *
// 	 * @return {@code true} if the user is a sub, {@code false} if not
// 	 */
// 	public boolean isSub();
// 
// 	/**Retrieves this users {@link USER_TYPE} <br>
// 	 * There are seven USER_TYPEs: OWNER, MOD, GLOBAL_MOD, ADMIN, STAFF, SUBSCRIBER and DEFAULT.
// 	 *
// 	 * @return The user's USER_TYPE
// 	 */
// 	public USER_TYPE getUserType();
// 
// 	/**Retrieves this users display color, as seen in Twitch chat.<br>
// 	 * The color is a hexadecimal number.
// 	 *
// 	 * @return The users display color, as a hex number
// 	 */
// 	public int getColor();
// 
// 	/**Retrieves the users set of badges in Twitch chat. A badge looks like this: <br>
// 	 * {@code broadcaster/1} <br><br>
// 	 *
// 	 * There are several different badges, such as {@code broadcaster/1}, {@code turbo/1} and so on. I do
// 	 * not know all of them explicitly, or what to do with them.
// 	 *
// 	 * TODO: Find out more about badges
// 	 *
// 	 * @return Arrays of strings, representing this users badges. Might be empty if user has none.
// 	 */
// 	public String[] getBadges();
// 
// 	/**Retrieves this user's unique user ID. This ID is decided by Twitch, and will
// 	 * always be the same for the same user
// 	 *
// 	 * @return The users unique user ID
// 	 */
// 	public long getUserID();
// }


// Path: src/test/java/com/gikk/twirk/types/twitchMessage/TestMessage.java
import com.gikk.twirk.TestBiConsumer;
import com.gikk.twirk.TestResult;
import com.gikk.twirk.types.users.TwitchUser;
import java.util.function.Consumer;
import static org.junit.Assert.*;

package com.gikk.twirk.types.twitchMessage;


public class TestMessage {
    final static String USER_MESSAGE_NO_EMOTE = "@badges=;color=;display-name=Gikkman;emotes=;mod=0;room-id=31974228;subscriber=0;turbo=0;user-id=27658385;user-type= :gikkman!gikkman@gikkman.tmi.twitch.tv PRIVMSG #gikkman :userMessage 조선말";
    final static String USER_MESSAGE_WITH_EMOTE = "@badges=;color=#FF69B4;display-name=Gikklol;emotes=86:10-19;mod=0;room-id=31974228;subscriber=0;turbo=0;user-id=27658385;user-type= :gikklol!gikklol@gikklol.tmi.twitch.tv PRIVMSG #gikkman :beefin it BibleThump";

    public static void testPrivMsg(Consumer<String> twirkInput, TestBiConsumer<TwitchUser, TwitchMessage> test ) throws Exception{
        TestResult t1 = test.assign(TestMessage::testUserMessageNoEmote);
        twirkInput.accept(USER_MESSAGE_NO_EMOTE);
        t1.await();

        TestResult t2 = test.assign(TestMessage::testUserMessageWithEmote);