// Path: client-transport/src/main/java/com/nortal/jroad/model/XmlBeansXRoadMetadata.java
// public class XmlBeansXRoadMetadata implements Serializable {
//   private static final long serialVersionUID = 1L;
// 
//   private String operationName;
//   private String operationNs;
// 
//   private String requestElementName;
//   private String requestElementNs;
// 
//   private String responseElementName;
//   private String responseElementNs;
// 
//   private String version;
// 
//   public XmlBeansXRoadMetadata(String operationName,
//                               String operationNs,
//                               String requestElementName,
//                               String requestElementNs,
//                               String responseElementName,
//                               String responseElementNs,
//                               String version) {
//     this.operationName = operationName;
//     this.operationNs = operationNs;
//     this.requestElementName = requestElementName;
//     this.requestElementNs = requestElementNs;
//     this.responseElementName = responseElementName;
//     this.responseElementNs = responseElementNs;
//     this.version = version;
//   }
// 
//   public String getOperationName() {
//     return operationName;
//   }
// 
//   public void setOperationName(String operationName) {
//     this.operationName = operationName;
//   }
// 
//   public String getOperationNs() {
//     return operationNs;
//   }
// 
//   public void setOperationNs(String operationNs) {
//     this.operationNs = operationNs;
//   }
// 
//   public String getResponseElementName() {
//     return responseElementName;
//   }
// 
//   public void setResponseElementName(String responseElementName) {
//     this.responseElementName = responseElementName;
//   }
// 
//   public String getRequestElementName() {
//     return requestElementName;
//   }
// 
//   public String getRequestElementNs() {
//     return requestElementNs;
//   }
// 
//   public String getResponseElementNs() {
//     return responseElementNs;
//   }
// 
//   public void setResponseElementNs(String responseElementNs) {
//     this.responseElementNs = responseElementNs;
//   }
// 
//   public String getVersion() {
//     return version;
//   }
// 
// }


import com.nortal.jroad.model.XRoadMessage;
import com.nortal.jroad.model.XmlBeansXRoadMetadata;
import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
import org.springframework.ws.soap.saaj.SaajSoapMessage;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import java.io.IOException;
import java.io.InputStream;
import static org.junit.Assert.assertEquals;
    private final static String RESULT_SINGLE_ROW_FORMAT = "<response xmlns:era=\"http://earest.x-road.eu/\" xmlns=\"f\">\n" +
            "  <request xmlns=\"\">\n" +
            "    <ParinguKoostamiseAeg>2017-10-06T15:51:00</ParinguKoostamiseAeg>\n" +
            "  </request>\n" +
            "  <response xmlns=\"\">\n" +
            "    <ArestiVastused>\n" +
            "      <Vastus>\n" +
            "        <IsikuOigusedKohustused>\n" +
            "          <Akt>\n" +
            "            <AlgParinguUnikaalneID>A801201702209240</AlgParinguUnikaalneID>\n" +
            "            <VolitatudKasutajad>\n" +
            "              <VolitatudKasutaja>\n" +
            "                <VolituseLaad/>\n" +
            "                <VolituseFailiNimi>jyritamm</VolituseFailiNimi>\n" +
            "                <VolituseFail>JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb" +
            "2cvUGFnZXMgMiAwIFIvTGFuZyhldC1FRSkgL1N0cnVjdFRyZWVSb290IDE1IDAgUi9NYXJrSW5mbzw8L01h" +
            "cmtlZCB0cnVlPj4+CjE1MDc2Nw0KJSVFT0YNCnhyZWYNCjAgMA0KdHJhaWxlcg0KPDwvU2l6ZSAyNy9Sb29" +
            "0IDEgMCBSL0luZm8gMTQgMCBSL0lEWzxBNDQzRkEyNkVCQzM3RTRDODczOUFEQkYxNUEyRTZDRj48QTQ0M0" +
            "ZBMjZFQkMzN0U0Qzg3MzlBREJGMTVBMkU2Q0YXSAvUHJldiAxNTA3NjcvWFJlZlN0bSAxNTA0NjM+Pg0Kc3" +
            "RhcnR4cmVmDQoxNTE0NjUNCiUlRU9G</VolituseFail>\n" +
            "              </VolitatudKasutaja>\n" +
            "            </VolitatudKasutajad>\n" +
            "          </Akt>\n" +
            "        </IsikuOigusedKohustused>\n" +
            "      </Vastus>\n" +
            "    </ArestiVastused>\n" +
            "  </response>\n" +
            "</response>";

    public static final StandardXRoadConsumerMessageExtractor EXTRACTOR =
// Path: client-transport/src/main/java/com/nortal/jroad/model/XmlBeansXRoadMetadata.java
// public class XmlBeansXRoadMetadata implements Serializable {
//   private static final long serialVersionUID = 1L;
// 
//   private String operationName;
//   private String operationNs;
// 
//   private String requestElementName;
//   private String requestElementNs;
// 
//   private String responseElementName;
//   private String responseElementNs;
// 
//   private String version;
// 
//   public XmlBeansXRoadMetadata(String operationName,
//                               String operationNs,
//                               String requestElementName,
//                               String requestElementNs,
//                               String responseElementName,
//                               String responseElementNs,
//                               String version) {
//     this.operationName = operationName;
//     this.operationNs = operationNs;
//     this.requestElementName = requestElementName;
//     this.requestElementNs = requestElementNs;
//     this.responseElementName = responseElementName;
//     this.responseElementNs = responseElementNs;
//     this.version = version;
//   }
// 
//   public String getOperationName() {
//     return operationName;
//   }
// 
//   public void setOperationName(String operationName) {
//     this.operationName = operationName;
//   }
// 
//   public String getOperationNs() {
//     return operationNs;
//   }
// 
//   public void setOperationNs(String operationNs) {
//     this.operationNs = operationNs;
//   }
// 
//   public String getResponseElementName() {
//     return responseElementName;
//   }
// 
//   public void setResponseElementName(String responseElementName) {
//     this.responseElementName = responseElementName;
//   }
// 
//   public String getRequestElementName() {
//     return requestElementName;
//   }
// 
//   public String getRequestElementNs() {
//     return requestElementNs;
//   }
// 
//   public String getResponseElementNs() {
//     return responseElementNs;
//   }
// 
//   public void setResponseElementNs(String responseElementNs) {
//     this.responseElementNs = responseElementNs;
//   }
// 
//   public String getVersion() {
//     return version;
//   }
// 
// }


// Path: client-transport/src/test/java/com/nortal/jroad/client/service/extractor/StandardXRoadConsumerMessageExtractorTest.java
import com.nortal.jroad.model.XRoadMessage;
import com.nortal.jroad.model.XmlBeansXRoadMetadata;
import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
import org.springframework.ws.soap.saaj.SaajSoapMessage;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import java.io.IOException;
import java.io.InputStream;
import static org.junit.Assert.assertEquals;

    private final static String RESULT_SINGLE_ROW_FORMAT = "<response xmlns:era=\"http://earest.x-road.eu/\" xmlns=\"f\">\n" +
            "  <request xmlns=\"\">\n" +
            "    <ParinguKoostamiseAeg>2017-10-06T15:51:00</ParinguKoostamiseAeg>\n" +
            "  </request>\n" +
            "  <response xmlns=\"\">\n" +
            "    <ArestiVastused>\n" +
            "      <Vastus>\n" +
            "        <IsikuOigusedKohustused>\n" +
            "          <Akt>\n" +
            "            <AlgParinguUnikaalneID>A801201702209240</AlgParinguUnikaalneID>\n" +
            "            <VolitatudKasutajad>\n" +
            "              <VolitatudKasutaja>\n" +
            "                <VolituseLaad/>\n" +
            "                <VolituseFailiNimi>jyritamm</VolituseFailiNimi>\n" +
            "                <VolituseFail>JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb" +
            "2cvUGFnZXMgMiAwIFIvTGFuZyhldC1FRSkgL1N0cnVjdFRyZWVSb290IDE1IDAgUi9NYXJrSW5mbzw8L01h" +
            "cmtlZCB0cnVlPj4+CjE1MDc2Nw0KJSVFT0YNCnhyZWYNCjAgMA0KdHJhaWxlcg0KPDwvU2l6ZSAyNy9Sb29" +
            "0IDEgMCBSL0luZm8gMTQgMCBSL0lEWzxBNDQzRkEyNkVCQzM3RTRDODczOUFEQkYxNUEyRTZDRj48QTQ0M0" +
            "ZBMjZFQkMzN0U0Qzg3MzlBREJGMTVBMkU2Q0YXSAvUHJldiAxNTA3NjcvWFJlZlN0bSAxNTA0NjM+Pg0Kc3" +
            "RhcnR4cmVmDQoxNTE0NjUNCiUlRU9G</VolituseFail>\n" +
            "              </VolitatudKasutaja>\n" +
            "            </VolitatudKasutajad>\n" +
            "          </Akt>\n" +
            "        </IsikuOigusedKohustused>\n" +
            "      </Vastus>\n" +
            "    </ArestiVastused>\n" +
            "  </response>\n" +
            "</response>";

    public static final StandardXRoadConsumerMessageExtractor EXTRACTOR =
            new StandardXRoadConsumerMessageExtractor(new XmlBeansXRoadMetadata("operation",