1   /*
2    * $Id: GlobalPropertiesMule2458TestCase.java 11435 2008-03-20 04:31:36Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.test.spring;
12  
13  import org.mule.api.endpoint.ImmutableEndpoint;
14  import org.mule.api.service.Service;
15  import org.mule.tck.FunctionalTestCase;
16  
17  public class GlobalPropertiesMule2458TestCase extends FunctionalTestCase
18  {
19  
20      protected String getConfigResources()
21      {
22          return "org/mule/test/spring/global-properties-mule-2458-test.xml";
23      }
24  
25      public void testProperties()
26      {
27          Service service = muleContext.getRegistry().lookupService("service");
28          assertNotNull(service);
29          ImmutableEndpoint ep = (ImmutableEndpoint) service.getInboundRouter().getEndpoints().get(0);
30          assertNotNull(ep);
31          assertEquals("local", ep.getProperties().get("local"));
32          assertEquals("global", ep.getProperties().get("global"));
33          assertEquals("local", ep.getProperties().get("override-me"));
34          assertEquals(3, ep.getProperties().size());
35      }
36  
37  }