// Path: friendly-id/src/main/java/com/devskiller/friendly_id/FriendlyId.java
// public class FriendlyId {
// 
// 	/**
// 	 * Create FriendlyId id
// 	 *
// 	 * @return Friendly Id encoded UUID
// 	 */
// 	public static String createFriendlyId() {
// 		return Url62.encode(UUID.randomUUID());
// 	}
// 
// 	/**
// 	 * Encode UUID to FriendlyId id
// 	 *
// 	 * @param uuid UUID to be encoded
// 	 * @return Friendly Id encoded UUID
// 	 */
// 	public static String toFriendlyId(UUID uuid) {
// 		return Url62.encode(uuid);
// 	}
// 
// 	/**
// 	 * Decode Friendly Id to UUID
// 	 *
// 	 * @param friendlyId encoded UUID
// 	 * @return decoded UUID
// 	 */
// 	public static UUID toUuid(String friendlyId) {
// 		return Url62.decode(friendlyId);
// 	}
// 
// }
// 
// Path: friendly-id/src/main/java/com/devskiller/friendly_id/FriendlyId.java
// public static UUID toUuid(String friendlyId) {
// 	return Url62.decode(friendlyId);
// }


import com.devskiller.friendly_id.FriendlyId;
import com.devskiller.friendly_id.spring.EnableFriendlyId;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import java.util.UUID;
import static com.devskiller.friendly_id.FriendlyId.toUuid;
import static org.hamcrest.CoreMatchers.is;
import static org.mockito.BDDMockito.given;
import static org.mockito.BDDMockito.then;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
package com.devskiller.friendly_id.sample.customized;




@RunWith(SpringRunner.class)
@WebMvcTest(BarController.class)
@EnableFriendlyId
public class ApplicationTest {

	@Autowired
	MockMvc mockMvc;

	@MockBean
	FooService fooService;

	@Test
	public void shouldSerialize() throws Exception {

		// given
		UUID uuid = UUID.randomUUID();
		given(fooService.find(uuid)).willReturn(new Bar(uuid, uuid));

		// expect
// Path: friendly-id/src/main/java/com/devskiller/friendly_id/FriendlyId.java
// public class FriendlyId {
// 
// 	/**
// 	 * Create FriendlyId id
// 	 *
// 	 * @return Friendly Id encoded UUID
// 	 */
// 	public static String createFriendlyId() {
// 		return Url62.encode(UUID.randomUUID());
// 	}
// 
// 	/**
// 	 * Encode UUID to FriendlyId id
// 	 *
// 	 * @param uuid UUID to be encoded
// 	 * @return Friendly Id encoded UUID
// 	 */
// 	public static String toFriendlyId(UUID uuid) {
// 		return Url62.encode(uuid);
// 	}
// 
// 	/**
// 	 * Decode Friendly Id to UUID
// 	 *
// 	 * @param friendlyId encoded UUID
// 	 * @return decoded UUID
// 	 */
// 	public static UUID toUuid(String friendlyId) {
// 		return Url62.decode(friendlyId);
// 	}
// 
// }
// 
// Path: friendly-id/src/main/java/com/devskiller/friendly_id/FriendlyId.java
// public static UUID toUuid(String friendlyId) {
// 	return Url62.decode(friendlyId);
// }


// Path: friendly-id-samples/friendly-id-spring-boot-customized/src/test/java/com/devskiller/friendly_id/sample/customized/ApplicationTest.java
import com.devskiller.friendly_id.FriendlyId;
import com.devskiller.friendly_id.spring.EnableFriendlyId;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import java.util.UUID;
import static com.devskiller.friendly_id.FriendlyId.toUuid;
import static org.hamcrest.CoreMatchers.is;
import static org.mockito.BDDMockito.given;
import static org.mockito.BDDMockito.then;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;

package com.devskiller.friendly_id.sample.customized;




@RunWith(SpringRunner.class)
@WebMvcTest(BarController.class)
@EnableFriendlyId
public class ApplicationTest {

	@Autowired
	MockMvc mockMvc;

	@MockBean
	FooService fooService;

	@Test
	public void shouldSerialize() throws Exception {

		// given
		UUID uuid = UUID.randomUUID();
		given(fooService.find(uuid)).willReturn(new Bar(uuid, uuid));

		// expect
		mockMvc.perform(get("/bars/{id}", FriendlyId.toFriendlyId(uuid)))