Package java.util

Examples of java.util.UUID


        assertTrue("Unexpected provider children found", storeEntry.getChildrenIds().isEmpty());
    }

    public void testSaveTrustStore()
    {
        UUID trustStoreId = UUID.randomUUID();
        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put(TrustStore.NAME, getName());
        attributes.put(TrustStore.PATH, "/path/to/truststore");
        attributes.put(TrustStore.PASSWORD, "my-secret-password");
        attributes.put(TrustStore.TYPE, "NON-JKS");
View Full Code Here


        assertTrue("Unexpected provider children found", storeEntry.getChildrenIds().isEmpty());
    }

    public void testSaveKeyStore()
    {
        UUID keyStoreId = UUID.randomUUID();
        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put(KeyStore.NAME, getName());
        attributes.put(KeyStore.PATH, "/path/to/truststore");
        attributes.put(KeyStore.PASSWORD, "my-secret-password");
        attributes.put(KeyStore.TYPE, "NON-JKS");
View Full Code Here

        assertTrue("Unexpected provider children found", storeEntry.getChildrenIds().isEmpty());
    }

    public void testSaveGroupProvider()
    {
        UUID groupProviderId = UUID.randomUUID();
        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put(GroupProvider.NAME, getName());

        ConfigurationEntry groupProviderEntry = new ConfigurationEntry(groupProviderId, GroupProvider.class.getSimpleName(), attributes,
                Collections.<UUID> emptySet(), _store);
View Full Code Here

        assertTrue("Unexpected provider children found", storeEntry.getChildrenIds().isEmpty());
    }

    public void testSavePort()
    {
        UUID portId = UUID.randomUUID();
        Map<String, Object> attributes = new HashMap<String, Object>();
        Set<String> tcpTransportSet = Collections.singleton(Transport.TCP.name());
        attributes.put(Port.PORT, 9999);
        attributes.put(Port.TRANSPORTS, tcpTransportSet);
        attributes.put(Port.TCP_NO_DELAY, true);
View Full Code Here

        assertTrue("Unexpected port children found", storeEntry.getChildrenIds().isEmpty());
    }

    public void testMultipleSave()
    {
        UUID virtualHostId = UUID.randomUUID();
        Map<String, Object> virtualHostAttributes = new HashMap<String, Object>();
        virtualHostAttributes.put(VirtualHost.NAME, "test1");
        virtualHostAttributes.put(VirtualHost.CONFIG_PATH, "/path/to/phantom/virtualhost/config1");
        ConfigurationEntry hostEntry = new ConfigurationEntry(virtualHostId, VirtualHost.class.getSimpleName(), virtualHostAttributes,
                Collections.<UUID> emptySet(), _store);

        UUID keyStoreId = UUID.randomUUID();
        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put(KeyStore.NAME, getName());
        attributes.put(KeyStore.PATH, "/path/to/truststore");
        attributes.put(KeyStore.PASSWORD, "my-secret-password");
        attributes.put(KeyStore.TYPE, "NON-JKS");
View Full Code Here

        assertNotNull("Key store is not found", _store.getEntry(keyStoreId));
    }

    public void testAddPreferencesProvider()
    {
        UUID preferencesProviderId = UUID.randomUUID();
        String path = TMP_FOLDER;
        String name = getTestName();

        addPreferencesProvider(preferencesProviderId, name, path);
View Full Code Here

    public void testRecoverFileSystemPreferencesProvider()
    {
        PreferencesProviderRecoverer recoverer = new PreferencesProviderRecoverer();

        Map<String, Object> attributes = new HashMap<String, Object>();
        UUID id = UUID.randomUUID();
        attributes.put(PreferencesProvider.TYPE, FileSystemPreferencesProvider.PROVIDER_TYPE);
        attributes.put(PreferencesProvider.NAME, "test-provider");
        File file = TestFileUtils.createTempFile(this, ".prefs.json", "{\"test_user\":{\"pref1\": \"pref1Value\", \"pref2\": 1.0} }");
        try
        {
View Full Code Here

                    {
                        while(rs.next())
                        {

                            String actionType = rs.getString(1);
                            UUID queueId = UUID.fromString(rs.getString(2));
                            long messageId = rs.getLong(3);

                            RecordImpl record = new RecordImpl(queueId, messageId);
                            List<RecordImpl> records = "E".equals(actionType) ? enqueues : dequeues;
                            records.add(record);
View Full Code Here

                {
                    @Override
                    public Exchange answer(InvocationOnMock invocation) throws Throwable
                    {
                        final String name = exchangeNameCapture.getValue();
                        final UUID id = idCapture.getValue();

                        final Exchange exchange = mock(Exchange.class);
                        ExchangeType exType = mock(ExchangeType.class);

                        when(exchange.getName()).thenReturn(name);
View Full Code Here

            binding.put(Binding.ARGUMENTS, arguments);
        }

        private boolean isTopicExchange(Map<String, Object> binding)
        {
            UUID exchangeId = UUID.fromString((String)binding.get(Binding.EXCHANGE));

            if(_records.containsKey(exchangeId))
            {
                return "topic".equals(_records.get(exchangeId)
                                              .getAttributes()
View Full Code Here

TOP

Related Classes of java.util.UUID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.