1   /*
2    * $Id: HttpBadEncodingFunctionalTestCase.java 7963 2007-08-21 08:53:15Z 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.providers.http.functional;
12  
13  import org.mule.extras.client.MuleClient;
14  import org.mule.providers.http.HttpConnector;
15  import org.mule.providers.http.HttpConstants;
16  import org.mule.umo.UMOMessage;
17  
18  import java.util.HashMap;
19  import java.util.Map;
20  
21  public class HttpBadEncodingFunctionalTestCase extends HttpEncodingFunctionalTestCase
22  {
23  
24      public void testSend() throws Exception
25      {
26          MuleClient client = new MuleClient();
27          Map messageProperties = new HashMap();
28          messageProperties.put(HttpConstants.HEADER_CONTENT_TYPE, "text/plain;charset=UTFF-912");
29          UMOMessage reply = client.send("clientEndpoint", TEST_MESSAGE, messageProperties);
30          assertNotNull(reply);
31          assertEquals("500", reply.getProperty(HttpConnector.HTTP_STATUS_PROPERTY));
32          assertNotNull(reply.getExceptionPayload());
33      }
34  
35  }