@@ -0,0 +1,1889 @@
+/*%0A * Copyright (C) 2013 The enviroCar project%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as%0A * published by the Free Software Foundation, either version 3 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage org.envirocar.server.rest.schema;%0A%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0Aimport org.envirocar.server.rest.MediaTypes;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0A/**%0A * TODO JavaDoc%0A *%0A * @author matthes rieke%0A */%0A@RunWith(GuiceRunner.class)%0Apublic class BadgesValidationTest %7B%0A    private static final String BADGE%0A            = %22%7B%5C%22name%5C%22:%5C%22contributor%5C%22,%22%0A            %09%09+ %22%5C%22displayName%5C%22: %7B%5C%22en%5C%22: %5C%22Contributor%5C%22,%5C%22de%5C%22: %5C%22Unterst%C3%BCtzer%5C%22%7D,%22%0A            %09%09+ %22%5C%22description%5C%22: %7B%5C%22en%5C%22: %5C%22an enviroCar contributor%5C%22,%22%0A            %09%09+ %22%5C%22de%5C%22: %5C%22ein enviroCar unterst%C3%BCtzer%5C%22%7D%7D%22;%0A    private static final String BADGES%0A            = %22%7B%5C%22badges%5C%22:%5B%22 + BADGE + %22%5D%7D%22;%0A    @Rule%0A    public final ValidationRule validate = new ValidationRule();%0A%0A    @Test%0A    public void validateList() %7B%0A        assertThat(validate.parse(BADGES),%0A                   is(validate.validInstanceOf(MediaTypes.BADGES_TYPE)));%0A    %7D%0A%0A    @Test%0A    public void validateInstance() %7B%0A        assertThat(validate.parse(BADGE),%0A                   is(validate.validInstanceOf(MediaTypes.BADGE_TYPE)));%0A    %7D%0A%7D%0A

add badges validation test