@@ -0,0 +1,1901 @@
+package functional.yaml;%0A%0Aimport functional.ApplicationTests;%0Aimport org.junit.Test;%0Aimport play.libs.ws.WSResponse;%0A%0Aimport static org.fest.assertions.Assertions.assertThat;%0Aimport static play.mvc.Http.Status.OK;%0A%0Apublic class YamlSanityTest extends ApplicationTests %7B%0A%0A    public static final String TEST_JSON = %22%7B%5C%22test-register%5C%22:%5C%22testregisterkey%5C%22,%5C%22name%5C%22:%5C%22The Entry%5C%22,%5C%22key1%5C%22: %5C%22value1%5C%22,%5C%22key2%5C%22: %5B%5C%22A%5C%22,%5C%22B%5C%22%5D%7D%22;%0A    public static final String EXPECTED_HASH = %224686f89b9c983f331c7deef476fda719148de4fb%22;%0A    public static final String EXPECTED_YAML = %22---%5Cn%22 +%0A            %22hash: %5C%224686f89b9c983f331c7deef476fda719148de4fb%5C%22%5Cn%22 +%0A            %22entry:%5Cn%22 +%0A            %22  key1: %5C%22value1%5C%22%5Cn%22 +%0A            %22  key2:%5Cn%22 +%0A            %22  - %5C%22A%5C%22%5Cn%22 +%0A            %22  - %5C%22B%5C%22%5Cn%22 +%0A            %22  name: %5C%22The Entry%5C%22%5Cn%22 +%0A            %22  test-register: %5C%22testregisterkey%5C%22%5Cn%22;%0A%0A    @Test%0A    public void testFindOneByKey() throws Exception %7B%0A        postJson(%22/create%22, TEST_JSON);%0A%0A        WSResponse response = getByKV(%22key1%22, %22value1%22, %22yaml%22);%0A        assertThat(response.getStatus()).isEqualTo(OK);%0A        assertThat(response.getBody()).isEqualTo(EXPECTED_YAML);%0A    %7D%0A%0A    @Test%0A    public void testFindOneByHash() throws Exception %7B%0A        postJson(%22/create%22, TEST_JSON);%0A%0A        WSResponse response = getByHash(EXPECTED_HASH, %22yaml%22);%0A%0A        assertThat(response.getStatus()).isEqualTo(OK);%0A        assertThat(response.getBody()).isEqualTo(EXPECTED_YAML);%0A    %7D%0A%0A%0A    @Test%0A    public void test404ErrorResponse() throws Exception %7B%0A        WSResponse response = get(%22/idonotexist?_representation=yaml%22);%0A        assertThat(response.getStatus()).isEqualTo(404);%0A        assertThat(response.getBody()).isEqualTo(%0A                %22---%5Cn%22 +%0A                        %22message: %5C%22Page not found%5C%22%5Cn%22 +%0A                        %22errors: %5B%5D%5Cn%22 +%0A                        %22status: 404%5Cn%22);%0A    %7D%0A%7D%0A

add tests for yaml representation