/**
 * This code was generated by
 * \ / _    _  _|   _  _
 *  | (_)\/(_)(_|\/| |(/_  v1.0.0
 *       /       /
 */

package com.twilio.twiml.voice;

import org.junit.Assert;
import org.junit.Test;

/**
 * Test class for {@link Room}
 */
public class RoomTest {
    @Test
    public void testElementWithParams() {
        Room elem = new Room.Builder("name").participantIdentity("participant_identity").build();

        Assert.assertEquals(
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
            "<Room participantIdentity=\"participant_identity\">name</Room>",
            elem.toXml()
        );
    }

    @Test
    public void testXmlAttributesDeserialization() {
        final Room elem = new Room.Builder("name").participantIdentity("participant_identity").build();

        Assert.assertEquals(
            Room.Builder.fromXml("<Room participantIdentity=\"participant_identity\">name</Room>").build().toXml(),
            elem.toXml()
        );
    }
}