@@ -0,0 +1,2353 @@
+/*%0A * Copyright 2017, TeamDev Ltd. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage io.spine.validate;%0A%0Aimport com.google.protobuf.UInt32Value;%0Aimport org.junit.Test;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport static junit.framework.TestCase.assertTrue;%0A%0A%0Apublic class AbstractValidatingBuilderShould %7B%0A%0A    @Test%0A    public void convert_to_map() throws Exception %7B%0A        final String key1 = %22key1%22;%0A        final UInt32Value value = UInt32Value.newBuilder().setValue(123).build();%0A        final String mapStr = %22%5C%22key1%5C%22:%5C%22123%5C%22,%5C%22key2%5C%22:%5C%22234%5C%22%22;%0A%0A        final UInt32ValueVBuilder uInt32ValueVBuilder = UInt32ValueVBuilder.newBuilder();%0A        final Map%3CString, UInt32Value%3E convertedValue = uInt32ValueVBuilder.convertToMap(mapStr, String.class, UInt32Value.class);%0A%0A        assertTrue(convertedValue.containsKey(key1));%0A        assertTrue(convertedValue.containsValue(value));%0A    %7D%0A%0A    @Test%0A    public void convert_to_list() throws Exception %7B%0A        final String key1 = %22key1%22;%0A        final String value = %22123%22;%0A        final String listStr = %22%5C%22key1%5C%22,%5C%22123%5C%22,%5C%22key2%5C%22,%5C%22234%5C%22%22;%0A%0A        final StringValueVBuilder stringValueVBuilder = StringValueVBuilder.newBuilder();%0A        final List%3CString%3E convertedValue = stringValueVBuilder.convertToList(listStr, String.class);%0A%0A        assertTrue(convertedValue.contains(key1));%0A        assertTrue(convertedValue.contains(value));%0A    %7D%0A%0A%7D%0A

Add tests for `AbstractValidatingBuilder`.