// Path: src/main/java/org/nextrtc/signalingserver/domain/Message.java
// @Getter
// @Builder(builderMethodName = "create")
// @AllArgsConstructor(access = AccessLevel.PRIVATE)
// public class Message {
//     /**
//      * Use Message.create(...) instead of new Message()
//      */
//     @Deprecated
//     Message() {
//     }
// 
//     @Expose
//     private String from = EMPTY;
// 
//     @Expose
//     private String to = EMPTY;
// 
//     @Expose
//     private String signal = EMPTY;
// 
//     @Expose
//     private String content = EMPTY;
// 
//     @Expose
//     private Map<String, String> custom = Maps.newHashMap();
// 
//     @Override
//     public String toString() {
//         return String.format("(%s -> %s)[%s]: %s |%s", from, to, signal, content, custom);
//     }
// }


import org.junit.Test;
import org.nextrtc.signalingserver.domain.Message;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
package org.nextrtc.signalingserver.api;



public class DecoderTest {

    private NextRTCServer.MessageDecoder decoder = new NextRTCServer.MessageDecoder();

    @Test
    public void shouldParseBasicObject() {
        // given
        String validJson = "{'from' : 'Alice',"//
                + "'to' : 'Bob',"//
                + "'signal' : 'join',"//
                + "'content' : 'something'}";

        // when
// Path: src/main/java/org/nextrtc/signalingserver/domain/Message.java
// @Getter
// @Builder(builderMethodName = "create")
// @AllArgsConstructor(access = AccessLevel.PRIVATE)
// public class Message {
//     /**
//      * Use Message.create(...) instead of new Message()
//      */
//     @Deprecated
//     Message() {
//     }
// 
//     @Expose
//     private String from = EMPTY;
// 
//     @Expose
//     private String to = EMPTY;
// 
//     @Expose
//     private String signal = EMPTY;
// 
//     @Expose
//     private String content = EMPTY;
// 
//     @Expose
//     private Map<String, String> custom = Maps.newHashMap();
// 
//     @Override
//     public String toString() {
//         return String.format("(%s -> %s)[%s]: %s |%s", from, to, signal, content, custom);
//     }
// }


// Path: src/test/java/org/nextrtc/signalingserver/api/DecoderTest.java
import org.junit.Test;
import org.nextrtc.signalingserver.domain.Message;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;

package org.nextrtc.signalingserver.api;



public class DecoderTest {

    private NextRTCServer.MessageDecoder decoder = new NextRTCServer.MessageDecoder();

    @Test
    public void shouldParseBasicObject() {
        // given
        String validJson = "{'from' : 'Alice',"//
                + "'to' : 'Bob',"//
                + "'signal' : 'join',"//
                + "'content' : 'something'}";

        // when
        Message result = decoder.decode(validJson);