// Path: src/main/java/jp/eisbahn/oauth2/server/utils/Util.java
// public class Util {
// 
// 	/**
// 	 * Decode the URL encoded string.
// 	 * @param source The URL encoded string.
// 	 * @return The decoded original string.
// 	 */
// 	public static String decodeParam(String source) {
// 		try {
// 			return URLDecoder.decode(source, "UTF-8");
// 		} catch (UnsupportedEncodingException e) {
// 			throw new IllegalStateException(e);
// 		}
// 	}
// 
// 	/**
// 	 * Decode the BASE64 encoded string.
// 	 * @param source The BASE64 string.
// 	 * @return The decoded original string.
// 	 */
// 	public static String decodeBase64(String source) {
// 		try {
// 			return new String(Base64.decodeBase64(source), "UTF-8");
// 		} catch (UnsupportedEncodingException e) {
// 			throw new IllegalStateException(e);
// 		}
// 	}
// 
// 	/**
// 	 * Encode the object to JSON format string.
// 	 * @param source The object that you want to change to JSON string.
// 	 * @return The JSON encoded string.
// 	 * @throws IllegalStateException If the translation failed.
// 	 */
// 	public static String toJson(Object source) {
// 		try {
// 			ObjectMapper mapper = new ObjectMapper();
// 			return mapper.writeValueAsString(source);
// 		} catch (JsonGenerationException e) {
// 			throw new IllegalStateException(e);
// 		} catch (JsonMappingException e) {
// 			throw new IllegalStateException(e);
// 		} catch (IOException e) {
// 			throw new IllegalStateException(e);
// 		}
// 	}
// 
// }


import org.junit.Test;
import static org.junit.Assert.assertEquals;
import jp.eisbahn.oauth2.server.utils.Util;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you 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 jp.eisbahn.oauth2.server.utils;



public class UtilTest {

	@Test
	public void testDecodeParam() throws Exception {
		String source = "wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D";
// Path: src/main/java/jp/eisbahn/oauth2/server/utils/Util.java
// public class Util {
// 
// 	/**
// 	 * Decode the URL encoded string.
// 	 * @param source The URL encoded string.
// 	 * @return The decoded original string.
// 	 */
// 	public static String decodeParam(String source) {
// 		try {
// 			return URLDecoder.decode(source, "UTF-8");
// 		} catch (UnsupportedEncodingException e) {
// 			throw new IllegalStateException(e);
// 		}
// 	}
// 
// 	/**
// 	 * Decode the BASE64 encoded string.
// 	 * @param source The BASE64 string.
// 	 * @return The decoded original string.
// 	 */
// 	public static String decodeBase64(String source) {
// 		try {
// 			return new String(Base64.decodeBase64(source), "UTF-8");
// 		} catch (UnsupportedEncodingException e) {
// 			throw new IllegalStateException(e);
// 		}
// 	}
// 
// 	/**
// 	 * Encode the object to JSON format string.
// 	 * @param source The object that you want to change to JSON string.
// 	 * @return The JSON encoded string.
// 	 * @throws IllegalStateException If the translation failed.
// 	 */
// 	public static String toJson(Object source) {
// 		try {
// 			ObjectMapper mapper = new ObjectMapper();
// 			return mapper.writeValueAsString(source);
// 		} catch (JsonGenerationException e) {
// 			throw new IllegalStateException(e);
// 		} catch (JsonMappingException e) {
// 			throw new IllegalStateException(e);
// 		} catch (IOException e) {
// 			throw new IllegalStateException(e);
// 		}
// 	}
// 
// }


// Path: src/test/java/jp/eisbahn/oauth2/server/utils/UtilTest.java
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import jp.eisbahn.oauth2.server.utils.Util;
import org.codehaus.jackson.annotate.JsonPropertyOrder;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you 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 jp.eisbahn.oauth2.server.utils;



public class UtilTest {

	@Test
	public void testDecodeParam() throws Exception {
		String source = "wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D";
		String result = Util.decodeParam(source);