// Path: core/src/main/java/edu/jhuapl/dorset/Response.java
// public enum Type {
//     ERROR("error"),
//     TEXT("text"),
//     IMAGE_EMBED("image_embed"),
//     IMAGE_URL("image_url"),
//     JSON("json");
// 
//     private final String type;
//     private Type(String type) {
//         this.type = type;
//     }
// 
//     /**
//      * Get the value of the type
//      *
//      * @return the value
//      */
//     public String getValue() {
//         return type;
//     }
// 
//     /**
//      * Get a Type enum member from a string
//      *
//      * @param value  the type as a string
//      * @return a Type enum member or null if no match
//      */
//     public static Type fromValue(String value) {
//         for (Type type : Type.values()) {
//             if (type.getValue().equals(value)) {
//                 return type;
//             }
//         }
//         return null;
//     }
// 
//     /**
//      * Does this response type use the payload field?
//      *
//      * @param type the response type
//      * @return true if it uses the payload field
//      */
//     public static boolean usesPayload(Type type) {
//         if (type == ERROR || type == TEXT) {
//             return false;
//         }
//         return true;
//     }
// }


import static org.junit.Assert.*;
import org.junit.Test;
import edu.jhuapl.dorset.Response.Type;
/*
 * Copyright 2016 The Johns Hopkins University Applied Physics Laboratory LLC
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package edu.jhuapl.dorset;




public class ResponseTest {

    @Test
    public void testFromValue() {
// Path: core/src/main/java/edu/jhuapl/dorset/Response.java
// public enum Type {
//     ERROR("error"),
//     TEXT("text"),
//     IMAGE_EMBED("image_embed"),
//     IMAGE_URL("image_url"),
//     JSON("json");
// 
//     private final String type;
//     private Type(String type) {
//         this.type = type;
//     }
// 
//     /**
//      * Get the value of the type
//      *
//      * @return the value
//      */
//     public String getValue() {
//         return type;
//     }
// 
//     /**
//      * Get a Type enum member from a string
//      *
//      * @param value  the type as a string
//      * @return a Type enum member or null if no match
//      */
//     public static Type fromValue(String value) {
//         for (Type type : Type.values()) {
//             if (type.getValue().equals(value)) {
//                 return type;
//             }
//         }
//         return null;
//     }
// 
//     /**
//      * Does this response type use the payload field?
//      *
//      * @param type the response type
//      * @return true if it uses the payload field
//      */
//     public static boolean usesPayload(Type type) {
//         if (type == ERROR || type == TEXT) {
//             return false;
//         }
//         return true;
//     }
// }


// Path: core/src/test/java/edu/jhuapl/dorset/ResponseTest.java
import static org.junit.Assert.*;
import org.junit.Test;
import edu.jhuapl.dorset.Response.Type;

/*
 * Copyright 2016 The Johns Hopkins University Applied Physics Laboratory LLC
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package edu.jhuapl.dorset;




public class ResponseTest {

    @Test
    public void testFromValue() {
        assertEquals(Type.TEXT, Type.fromValue("text"));