@@ -0,0 +1,2940 @@
+package de.timroes;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport de.timroes.axmlrpc.ResponseParser;%0Aimport de.timroes.axmlrpc.XMLRPCClient;%0Aimport de.timroes.axmlrpc.XMLRPCServerException;%0Aimport de.timroes.axmlrpc.serializer.SerializerHandler;%0Aimport org.junit.Test;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.InputStream;%0A%0Apublic class TestResponseParser %7B%0A    public final static String xmlDecl = %22%3C?xml version=%5C%221.0%5C%22?%3E%22;%0A    public final static SerializerHandler sh = new SerializerHandler(XMLRPCClient.FLAGS_NONE);%0A%0A%0A    @Test%0A    public void testSimpleResponse() throws Exception %7B%0A        ResponseParser sut = new ResponseParser();%0A        Object actual = sut.parse(sh, strToStream(xmlDecl +%0A                %22%3CmethodResponse%3E%22 +%0A                %22  %3Cparams%3E%22 +%0A                %22    %3Cparam%3E%22 +%0A                %22      %3Cvalue%3E%3Cstring%3Etoto%3C/string%3E%3C/value%3E%22 +%0A                %22    %3C/param%3E%22 +%0A                %22  %3C/params%3E%22 +%0A                %22%3C/methodResponse%3E%22), false);%0A        assertEquals(%22toto%22, actual);%0A    %7D%0A%0A    @Test%0A    /**%0A     * I'm not sure it really makes sense to support this case. But since I'm adding tests on code which existed%0A     * for years, I guess it's better to avoid breaking retro compatibility.%0A     */%0A    public void testAcceptMissingHeader() throws Exception %7B%0A        ResponseParser sut = new ResponseParser();%0A        Object actual = sut.parse(sh, strToStream(%22%3CmethodResponse%3E%22 +%0A                %22  %3Cparams%3E%22 +%0A                %22    %3Cparam%3E%22 +%0A                %22      %3Cvalue%3E%3Cstring%3Etoto%3C/string%3E%3C/value%3E%22 +%0A                %22    %3C/param%3E%22 +%0A                %22  %3C/params%3E%22 +%0A                %22%3C/methodResponse%3E%22), false);%0A        assertEquals(%22toto%22, actual);%0A    %7D%0A%0A    @Test%0A    public void testXmlrpcError() throws Exception %7B%0A        ResponseParser sut = new ResponseParser();%0A        try %7B%0A            sut.parse(sh, strToStream(%22%3CmethodResponse%3E%22 +%0A                    %22  %3Cfault%3E%22 +%0A                    %22    %3Cvalue%3E%22 +%0A                    %22      %3Cstruct%3E%22 +%0A                    %22        %3Cmember%3E%22 +%0A                    %22          %3Cname%3EfaultCode%3C/name%3E%22 +%0A                    %22          %3Cvalue%3E%3Cint%3E4%3C/int%3E%3C/value%3E%22 +%0A                    %22        %3C/member%3E%22 +%0A                    %22        %3Cmember%3E%22 +%0A                    %22          %3Cname%3EfaultString%3C/name%3E%22 +%0A                    %22          %3Cvalue%3E%3Cstring%3Eerror X occurred%3C/string%3E%3C/value%3E%22 +%0A                    %22        %3C/member%3E%22 +%0A                    %22      %3C/struct%3E%22 +%0A                    %22    %3C/value%3E%22 +%0A                    %22  %3C/fault%3E%22 +%0A                    %22%3C/methodResponse%3E%22), false);%0A            fail(%22The previous call should have thrown%22);%0A        %7D catch (XMLRPCServerException e)%7B%0A            assertEquals(%22error X occurred %5B4%5D%22, e.getMessage());%0A            assertEquals(4, e.getErrorNr());%0A        %7D%0A%7D%0A%0A    private static InputStream strToStream(String str)%7B%0A        return new ByteArrayInputStream(str.getBytes());%0A    %7D%0A%7D%0A

Add basic tests on the parser