@Test
    public void rejectSameNameOnAddingNewClient() {
        val client1 =
            new MockIndirectClient(NAME, new FoundAction(LOGIN_URL), Optional.empty(), new CommonProfile());
        val clients = new Clients(CALLBACK_URL, client1);
        Client client2 =
            new MockIndirectClient(NAME, new FoundAction(LOGIN_URL), Optional.empty(), new CommonProfile());
        clients.getClients().add(client2);
        TestsHelper.expectException(() -> clients.findClient(NAME),
            TechnicalException.class, "Duplicate name in clients: name");
    }
This class tests the {@link Clients} class.

@author Jerome Leleu
@since 1.3.0
pac4j-core/src/test/java/org/pac4j/core/client/ClientsTests.java