public static String joinFilter( char operator, List<String> parts )
    {
        final StringBuilder result = new StringBuilder();
        result.append('(').append(operator);
        for ( final String part : parts )
        {
            result.append('(').append(part).append(')');
        }
        result.append(')');
        return result.toString();
    }
@Test
    public void testJoinFilter() throws Exception
    {
        // Setup fixture.
        final List<String> input = new ArrayList<>();
        input.add( "foo" );
        input.add( "bar" );

        // Execute system under test.
        final String result = LdapManager.joinFilter( '|', input );

        // Verify result.
        assertNotNull( result );
        assertEquals( "(|(foo)(bar))", result );
    }