@@ -0,0 +1,2291 @@
+/*%0A * Copyright 2015, 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 lobby.common.util;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.Set;%0A%0Aimport static com.google.common.base.Strings.isNullOrEmpty;%0Aimport static com.google.common.collect.Sets.newHashSet;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0A%0A/**%0A * @author Alexander Litus%0A */%0A@SuppressWarnings(%22InstanceMethodNamingConvention%22)%0Apublic class RandomPasswordGeneratorShould %7B%0A%0A    private static final int PASSWORD_LENGTH = 7;%0A%0A    @Test%0A    public void generate_non_empty_password() %7B%0A        final String password = RandomPasswordGenerator.generate(PASSWORD_LENGTH);%0A        assertFalse(isNullOrEmpty(password));%0A    %7D%0A%0A    @Test%0A    public void generate_password_of_given_length() %7B%0A        final String password = RandomPasswordGenerator.generate(PASSWORD_LENGTH);%0A        assertEquals(PASSWORD_LENGTH, password.length());%0A    %7D%0A%0A    @Test%0A    public void generate_random_passwords() %7B%0A        final Set%3CObject%3E passwords = newHashSet();%0A        final int generationsCount = 30;%0A        for (int i = 0; i %3C generationsCount; i++) %7B%0A            final String password = RandomPasswordGenerator.generate(PASSWORD_LENGTH);%0A            passwords.add(password);%0A        %7D%0A        assertEquals(generationsCount, passwords.size());%0A    %7D%0A%7D%0A

Add random pwd generator tests.