@@ -0,0 +1,2251 @@
+/*%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 org.spine3.server.storage.jdbc.util;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.spine3.test.Tests.hasPrivateParameterlessCtor;%0A%0A/**%0A * @author Dmytro Dashenkov.%0A */%0Apublic class CloseablesShould %7B%0A%0A    @Test%0A    public void have_private_constructor() %7B%0A        assertTrue(hasPrivateParameterlessCtor(Closeables.class));%0A    %7D%0A%0A    @SuppressWarnings(%22MethodWithMultipleLoops%22) // Two loops - one for data set up and one for checks%0A    @Test%0A    public void close_all_passed_instances() %7B%0A        final int count = 10;%0A        final Set%3CStatefulClosable%3E closeables = new HashSet%3C%3E(count);%0A        for (int i = 0; i %3C count; i++) %7B%0A            closeables.add(new StatefulClosable());%0A        %7D%0A%0A        Closeables.closeAll(closeables);%0A%0A        for (StatefulClosable sc : closeables) %7B%0A            assertTrue(sc.closed);%0A        %7D%0A    %7D%0A%0A    private static class StatefulClosable implements AutoCloseable %7B%0A%0A        private boolean closed = false;%0A%0A        @Override%0A        public void close() throws Exception %7B%0A            assertFalse(closed);%0A            closed = true;%0A        %7D%0A    %7D%0A%7D%0A

Add `Closeables` test.