Skip to content
Snippets Groups Projects
Commit ca96e3c4 authored by OZGCloud's avatar OZGCloud
Browse files

Merge remote-tracking branch 'origin/master' into OZG-5286_eingang-A12

parents 8d2c96a8 94befdc7
No related branches found
No related tags found
No related merge requests found
Showing
with 787 additions and 52 deletions
......@@ -43,7 +43,8 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class FormDataEndpoint {
private static final String NAMESPACE_URI = "http://xmlns.cit.de/intelliform/2009/webservices/backend";
static final String NAMESPACE_URI = "http://xmlns.cit.de/intelliform/2009/webservices/backend";
static final String PAYLOAD_LOCAL_PART = "deposit";
private static final ObjectFactory objectFactory = new ObjectFactory();
......@@ -56,7 +57,7 @@ public class FormDataEndpoint {
@Autowired
private SemantikAdapter semantikAdapter;
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "deposit")
@PayloadRoot(namespace = NAMESPACE_URI, localPart = PAYLOAD_LOCAL_PART)
@ResponsePayload
public JAXBElement<DepositResponse> inputFormData(@RequestPayload Deposit deposit)
throws IOException, ParserConfigurationException {
......
......@@ -23,6 +23,15 @@
*/
package de.ozgcloud.eingang.intelliform;
import static java.util.stream.Collectors.*;
import java.util.List;
import java.util.Map;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import lombok.Builder;
public class AttachmentTestFactory {
public static final String XML_FILE_NAME = "XML-Daten-1.xml";
......@@ -43,50 +52,75 @@ public class AttachmentTestFactory {
<file content-type="image/png" description="" id="VendorId3333" length="155251">Image.png</file>
</Upload1>
</myForm>""";
public static final byte[] XML_CONTENT = XML_CONTENT_STRING.getBytes();
public static final String XML_CONTENT = XML_CONTENT_STRING;
public static final String XML_ATTACHMENT_ID = "myForm-xml";
public static final String XML_NAME = "XML-Daten.xml";
public static final String PDF_ATTACHMENT_CONTENT_TYPE = "application/pdf";
public static final byte[] PDF_ATTACHMENT_CONTENT = "TestContent2".getBytes();
public static final String PDF_ATTACHMENT_CONTENT = "TestContent2";
public static final String PDF_ATTACHMENT_NAME = "Scan1.pdf";
public static final String PDF_ATTACHMENT_ID = "VendorId2222";
public static final String PDF2_ATTACHMENT_ID = "VendorIdpdf2";
public static final String PNG_ATTACHMENT_CONTENT_TYPE = "application/pdf";
public static final byte[] PNG_ATTACHMENT_CONTENT = "TestContent3".getBytes();
public static final String PNG_ATTACHMENT_CONTENT = "TestContent3";
public static final String PNG_ATTACHMENT_NAME = "Image.png";
public static final String PNG_ATTACHMENT_ID = "VendorId3333";
public static final String JPG_ATTACHMENT_ID = "VendorIdjpg1";
public static final String ODT_ATTACHMENT_ID = "VendorIdodt1";
public static final String ODT_ATTACHMENT_CONTENT_TYPE = "application/vnd.oasis.opendocument.text";
public static final String DOCX_ATTACHMENT_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
public static final String DOCX_ATTACHMENT_CONTENT = "TestContent4";
public static final String DOCX1_ATTACHMENT_ID = "VendorIddocx1";
public static final String DOCX2_ATTACHMENT_ID = "VendorIddocx2";
public static final String DOCX3_ATTACHMENT_ID = "VendorIddocx3";
public static final String DOCX4_ATTACHMENT_ID = "VendorIddocx4";
public static final String DOCX5_ATTACHMENT_ID = "VendorIddocx5";
public static final String DOCX6_ATTACHMENT_ID = "VendorIddocx6";
public static final String DOCX7_ATTACHMENT_ID = "VendorIddocx7";
public static final String DOCX8_ATTACHMENT_ID = "VendorIddocx8";
public static final String ORGANISATIONSEINHEITEN_ID = "10363455";
public static final String ANTRAGSTELLER_ANREDE = "Herr";
public static final String ANTRAGSTELLER_ANREDE_CODE = "03";
public static final String ANTRAGSTELLER_NACHNAME = "Mustermann";
public static final String ATTRIBUTES_ENTRY_KEY = "X-IntelliForm-Signed";
public static final String ATTRIBUTES_ENTRY_VALUE = "false";
public static Attachment createXmlDaten() {
var attachment = new Attachment();
attachment.getAttributes().add(createAttributesEntry());
attachment.setContentType(XML_CONTENT_TYPE);
attachment.setId(XML_ATTACHMENT_ID);
attachment.setName(XML_NAME);
attachment.setContent(XML_CONTENT);
return attachment;
return createXmlDatenWithContent(XML_CONTENT);
}
public static Attachment createPdf() {
var attachment = new Attachment();
attachment.getAttributes().add(createAttributesEntry());
attachment.setContent(PDF_ATTACHMENT_CONTENT);
attachment.setContentType(PDF_ATTACHMENT_CONTENT_TYPE);
attachment.setId(PDF_ATTACHMENT_ID);
attachment.setName(PDF_ATTACHMENT_NAME);
return attachment;
return createAttachment(MetaAttachment.builder()
.id(PDF_ATTACHMENT_ID)
.name(PDF_ATTACHMENT_NAME)
.contentType(PDF_ATTACHMENT_CONTENT_TYPE)
.content(PDF_ATTACHMENT_CONTENT)
.build());
}
public static Attachment createPng() {
return createAttachment(MetaAttachment.builder()
.id(PNG_ATTACHMENT_ID)
.name(PNG_ATTACHMENT_NAME)
.contentType(PNG_ATTACHMENT_CONTENT_TYPE)
.content(PNG_ATTACHMENT_CONTENT)
.build());
}
private static Attachment createAttachment(MetaAttachment metaAttachment) {
var attachment = new Attachment();
attachment.getAttributes().add(createAttributesEntry());
attachment.setContent(PNG_ATTACHMENT_CONTENT);
attachment.setContentType(PNG_ATTACHMENT_CONTENT_TYPE);
attachment.setId(PNG_ATTACHMENT_ID);
attachment.setName(PNG_ATTACHMENT_NAME);
attachment.setContent(metaAttachment.content.getBytes());
attachment.setContentType(metaAttachment.contentType);
attachment.setId(metaAttachment.id);
attachment.setName(metaAttachment.name);
return attachment;
}
......@@ -96,4 +130,59 @@ public class AttachmentTestFactory {
attributesEntry.setValue(ATTRIBUTES_ENTRY_VALUE);
return attributesEntry;
}
public static List<Attachment> createManyAttachments(String xmlTemplateString, Map<String, String> templateValues,
String... attachmentParameterMatrix) {
var metaAttachments = arrayToMetaAttachments(attachmentParameterMatrix);
var allTemplateValues = Stream.concat(
templateValues.entrySet().stream(),
metaAttachments.stream().map(metaAttachment -> Map.entry(metaAttachment.templateId, metaAttachment.id))
).collect(toMap(Map.Entry::getKey, Map.Entry::getValue));
var xmlFormString = fillTemplateString(
xmlTemplateString,
allTemplateValues
);
return Stream.concat(
Stream.of(createXmlDatenWithContent(xmlFormString)),
metaAttachments.stream().map(AttachmentTestFactory::createAttachment)
).toList();
}
private static Attachment createXmlDatenWithContent(String content) {
return createAttachment(MetaAttachment.builder()
.id(XML_ATTACHMENT_ID)
.name(XML_NAME)
.contentType(XML_CONTENT_TYPE)
.content(content)
.build()
);
}
@Builder
private record MetaAttachment(String id, String name, String contentType, String content, String templateId) {
}
private static List<MetaAttachment> arrayToMetaAttachments(String[] array) {
int parameterCount = 5;
if (array.length % parameterCount != 0) {
throw new IllegalArgumentException("Matrix length must be divisible by %d.".formatted(parameterCount));
}
return IntStream.range(0, array.length / parameterCount)
.boxed()
.map(row -> row * parameterCount)
.map(offset -> new MetaAttachment(array[offset], array[offset + 1], array[offset + 2], array[offset + 3], array[offset + 4]))
.toList();
}
private static String fillTemplateString(String templateString, Map<String, String> templateValues) {
return templateValues.entrySet().stream()
.reduce(templateString,
(currentString, entry) -> currentString.replace("${" + entry.getKey() + "}", entry.getValue()),
(s1, s2) -> s1);
}
}
......@@ -136,6 +136,108 @@ class DepositDataMapperTest {
}
}
@DisplayName("with duplicate keys")
@Nested
class TestWithDuplicateKeys {
@BeforeEach
void mock() {
depositData = DepositDataTestFactory.create(List.of(
withEmptyName(createXmlDaten()),
createXmlDaten(),
withEmptyName(createPdf()),
createPdf(),
withEmptyName(createPng()),
createPng()
));
}
private Attachment withEmptyName(Attachment attachment) {
attachment.setName("");
return attachment;
}
@DisplayName("should keep last entry for representations")
@Test
void shouldKeepLastEntryForRepresentations() {
var formData = doMapping();
var representationFiles = formData.getRepresentations();
assertThat(getAttachmentVendorIds(representationFiles)).containsExactly(XML_ATTACHMENT_ID, PDF_ATTACHMENT_ID);
assertThat(getAttachmentFileNames(representationFiles)).containsExactly(XML_NAME, PDF_ATTACHMENT_NAME);
}
@DisplayName("should keep last entry for attachments")
@Test
void shouldKeepLastEntryForAttachments() {
var formData = doMapping();
var attachmentFiles = formData.getAttachments().stream()
.map(IncomingFileGroup::getFiles)
.flatMap(List::stream)
.toList();
assertThat(getAttachmentVendorIds(attachmentFiles)).containsExactly(PNG_ATTACHMENT_ID);
assertThat(getAttachmentFileNames(attachmentFiles)).containsExactly(PNG_ATTACHMENT_NAME);
}
private List<String> getAttachmentFileNames(List<IncomingFile> incomingFileList) {
return incomingFileList.stream()
.map(IncomingFile::getName)
.toList();
}
private List<String> getAttachmentVendorIds(List<IncomingFile> incomingFileList) {
return incomingFileList.stream()
.map(IncomingFile::getVendorId)
.toList();
}
}
@DisplayName("with many attachments")
@Nested
class TestWithManyAttachments {
@BeforeEach
void mock() {
depositData = DepositDataTestFactory.create(MANY_ATTACHMENTS);
}
@DisplayName("should return with representations")
@Test
void shouldReturnWithRepresentations() {
var formData = doMapping();
var incomingFileIds = formData.getRepresentations().stream()
.map(IncomingFile::getVendorId)
.toList();
assertThat(incomingFileIds).containsExactly(XML_ATTACHMENT_ID);
}
@DisplayName("should return with attachment groups")
@Test
void shouldReturnWithAttachmentGroups() {
var formData = doMapping();
var incomingFileIds = formData.getAttachments().stream()
.flatMap(group -> group.getFiles().stream())
.map(IncomingFile::getVendorId)
.toList();
assertThat(incomingFileIds).containsExactlyInAnyOrder(
DOCX1_ATTACHMENT_ID,
PDF_ATTACHMENT_ID,
DOCX2_ATTACHMENT_ID,
DOCX3_ATTACHMENT_ID,
DOCX4_ATTACHMENT_ID,
DOCX5_ATTACHMENT_ID,
DOCX6_ATTACHMENT_ID,
DOCX7_ATTACHMENT_ID,
DOCX8_ATTACHMENT_ID,
PDF2_ATTACHMENT_ID,
ODT_ATTACHMENT_ID,
JPG_ATTACHMENT_ID,
PNG_ATTACHMENT_ID
);
}
}
@DisplayName("with empty attachments")
@Nested
class TestWithEmptyAttachments {
......@@ -224,7 +326,7 @@ class DepositDataMapperTest {
void shouldHaveContentType() {
var incomingFile = doMapping();
assertThat(incomingFile.getName()).isEqualTo(XML_NAME);
assertThat(incomingFile.getContentType()).isEqualTo(XML_CONTENT_TYPE);
}
@DisplayName("should have size")
......@@ -232,7 +334,7 @@ class DepositDataMapperTest {
void shouldHaveSize() {
var incomingFile = doMapping();
assertThat(incomingFile.getSize()).isEqualTo(XML_CONTENT.length);
assertThat(incomingFile.getSize()).isEqualTo(XML_CONTENT.getBytes().length);
}
@DisplayName("should have file with content")
......
......@@ -23,8 +23,15 @@
*/
package de.ozgcloud.eingang.intelliform;
import static de.ozgcloud.eingang.intelliform.AttachmentTestFactory.*;
import java.time.Instant;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import de.ozgcloud.common.test.TestUtils;
public class DepositDataTestFactory {
......@@ -34,6 +41,33 @@ public class DepositDataTestFactory {
AttachmentTestFactory.createPng()
);
public static final List<Attachment> MANY_ATTACHMENTS = createManyAttachments(
TestUtils.loadTextFile("intelliform/XML-Daten-complex.template.xml"),
Map.of(
"oeid", ORGANISATIONSEINHEITEN_ID,
"uuid", UUID.randomUUID().toString(),
"transactionId", UUID.randomUUID().toString(),
"now", Instant.now().toString(),
"antragsteller_anrede", ANTRAGSTELLER_ANREDE,
"anrede_code", ANTRAGSTELLER_ANREDE_CODE,
"antragsteller_nachname", ANTRAGSTELLER_NACHNAME,
"antragsteller_vorname", "Max",
"antragsteller_email", "max.mustermann@example.com"
),
DOCX1_ATTACHMENT_ID, "Document1.docx", DOCX_ATTACHMENT_CONTENT_TYPE, DOCX_ATTACHMENT_CONTENT, "fileid-docx1",
PDF_ATTACHMENT_ID, "Document2.pdf", PDF_ATTACHMENT_CONTENT_TYPE, PDF_ATTACHMENT_CONTENT, "fileid-pdf1",
DOCX2_ATTACHMENT_ID, "Document3.docx", DOCX_ATTACHMENT_CONTENT_TYPE, DOCX_ATTACHMENT_CONTENT, "fileid-docx2",
DOCX3_ATTACHMENT_ID, "Document4.docx", DOCX_ATTACHMENT_CONTENT_TYPE, DOCX_ATTACHMENT_CONTENT, "fileid-docx3",
DOCX4_ATTACHMENT_ID, "Document5.docx", DOCX_ATTACHMENT_CONTENT_TYPE, DOCX_ATTACHMENT_CONTENT, "fileid-docx4",
DOCX5_ATTACHMENT_ID, "Document6.docx", DOCX_ATTACHMENT_CONTENT_TYPE, DOCX_ATTACHMENT_CONTENT, "fileid-docx5",
DOCX6_ATTACHMENT_ID, "Document7.docx", DOCX_ATTACHMENT_CONTENT_TYPE, DOCX_ATTACHMENT_CONTENT, "fileid-docx6",
DOCX7_ATTACHMENT_ID, "Document8.docx", DOCX_ATTACHMENT_CONTENT_TYPE, DOCX_ATTACHMENT_CONTENT, "fileid-docx7",
DOCX8_ATTACHMENT_ID, "Document9.docx", DOCX_ATTACHMENT_CONTENT_TYPE, DOCX_ATTACHMENT_CONTENT, "fileid-docx8",
PDF2_ATTACHMENT_ID, "Document9.pdf", PDF_ATTACHMENT_CONTENT_TYPE, PDF_ATTACHMENT_CONTENT, "fileid-pdf2",
ODT_ATTACHMENT_ID, "Document10.odt", ODT_ATTACHMENT_CONTENT_TYPE, "TestContent5", "fileid-odt1",
JPG_ATTACHMENT_ID, "Document11.jpg", "image/jpeg", "TestContent6", "fileid-jpg1",
PNG_ATTACHMENT_ID, "Document12.png", "image/png", "TestContent7", "fileid-png1");
public static DepositData create(Collection<Attachment> attachments) {
var depositData = new DepositData();
depositData.setPrimaryDataAttachmentId(AttachmentTestFactory.XML_ATTACHMENT_ID);
......
......@@ -23,13 +23,28 @@
*/
package de.ozgcloud.eingang.intelliform;
import static de.ozgcloud.eingang.intelliform.AttachmentTestFactory.*;
import static de.ozgcloud.eingang.intelliform.DepositDataTestFactory.*;
import static de.ozgcloud.eingang.intelliform.FormDataEndpoint.*;
import static de.ozgcloud.eingang.intelliform.XmlDaten1Container.*;
import static org.assertj.core.api.Assertions.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import jakarta.xml.bind.JAXBElement;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
......@@ -41,6 +56,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.Resource;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import org.springframework.ws.test.server.MockWebServiceClient;
import org.springframework.ws.test.server.RequestCreators;
import org.springframework.ws.test.server.ResponseActions;
......@@ -49,6 +65,7 @@ import org.springframework.ws.test.server.ResponseMatchers;
import de.ozgcloud.eingang.common.formdata.FormData;
import de.ozgcloud.eingang.common.formdata.PostfachAddressTestFactory;
import de.ozgcloud.eingang.router.VorgangRemoteService;
import de.ozgcloud.vorgang.vorgang.GrpcAntragsteller;
import de.ozgcloud.vorgang.vorgang.GrpcEingang;
import de.ozgcloud.vorgang.vorgang.GrpcFormData;
import de.ozgcloud.vorgang.vorgang.GrpcIncomingFile;
......@@ -64,9 +81,11 @@ class FormDataEndpointITCase {
private final static String RESPONSE = "EinfachesFormularZweiAnhaengeSoapResponse.xml";
private static final String SOAP_REQUEST_OTHER_NAME = "XML-Daten-1-other_name_SoapRequest.xml";
private static Jaxb2Marshaller marshaller;
@Autowired
private ApplicationContext applicationContext;
@MockBean
private VorgangRemoteService vorgangRemoteService;
......@@ -79,11 +98,186 @@ class FormDataEndpointITCase {
private MockWebServiceClient mockClient;
private DepositData depositData;
@BeforeAll
static void setupMarshaller() {
marshaller = new Jaxb2Marshaller();
marshaller.setPackagesToScan("de.ozgcloud.eingang.intelliform");
}
@BeforeEach
void initTest() {
mockClient = MockWebServiceClient.createClient(applicationContext);
}
@DisplayName("send antrag with many attachments")
@Nested
class TestSendAntragWithManyAttachments {
@BeforeEach
void mock() {
depositData = DepositDataTestFactory.create(MANY_ATTACHMENTS);
}
@DisplayName("should map antragsteller nachname")
@Test
void shouldMapAntragstellerNachname() {
sendDepositAndCaptureCreateVorgang();
var antragsteller = getCapturedAntragsteller();
assertThat(antragsteller.getNachname()).isEqualTo(ANTRAGSTELLER_NACHNAME);
}
@DisplayName("should map antragsteller anrede")
@Test
void shouldMapAntragstellerAnrede() {
sendDepositAndCaptureCreateVorgang();
var antragsteller = getCapturedAntragsteller();
assertThat(antragsteller.getAnrede()).isEqualTo(ANTRAGSTELLER_ANREDE);
}
private GrpcAntragsteller getCapturedAntragsteller() {
return grpcEingangCaptor.getValue().getAntragsteller();
}
@DisplayName("should have one representation")
@Test
void shouldHaveOneRepresentation() {
sendDepositAndCaptureCreateVorgang();
var eingang = grpcEingangCaptor.getValue();
var representationVendorIds = eingang.getRepresentationsList().stream()
.map(GrpcIncomingFile::getVendorId)
.toList();
assertThat(representationVendorIds).containsExactly(XML_ATTACHMENT_ID);
}
@DisplayName("should have attachments")
@Test
void shouldHaveAttachments() {
sendDepositAndCaptureCreateVorgang();
var eingang = grpcEingangCaptor.getValue();
var attachmentVendorIds = eingang.getAttachmentsList().stream()
.map(GrpcIncomingFileGroup::getFilesList)
.flatMap(Collection::stream)
.map(GrpcIncomingFile::getVendorId)
.toList();
assertThat(attachmentVendorIds).containsExactlyInAnyOrder(
DOCX1_ATTACHMENT_ID,
PDF_ATTACHMENT_ID,
DOCX2_ATTACHMENT_ID,
DOCX3_ATTACHMENT_ID,
DOCX4_ATTACHMENT_ID,
DOCX5_ATTACHMENT_ID,
DOCX6_ATTACHMENT_ID,
DOCX7_ATTACHMENT_ID,
DOCX8_ATTACHMENT_ID,
PDF2_ATTACHMENT_ID,
ODT_ATTACHMENT_ID,
JPG_ATTACHMENT_ID,
PNG_ATTACHMENT_ID
);
}
@DisplayName("should have organisationseinheitenID")
@Test
void shouldHaveOrganisationseinheitenId() {
sendDepositAndCaptureCreateVorgang();
var oeid = organisationsEinheitIdCaptor.getValue();
assertThat(oeid).hasValue(ORGANISATIONSEINHEITEN_ID);
var eingang = grpcEingangCaptor.getValue();
assertThat(eingang.getZustaendigeStelle().getOrganisationseinheitenId()).isEqualTo(ORGANISATIONSEINHEITEN_ID);
}
}
@DisplayName("with duplicate keys")
@Nested
class TestWithDuplicateKeys {
@BeforeEach
void mock() {
depositData = DepositDataTestFactory.create(List.of(
withEmptyName(createXmlDaten()),
createXmlDaten(),
withEmptyName(createPdf()),
createPdf(),
withEmptyName(createPng()),
createPng()
));
}
private Attachment withEmptyName(Attachment attachment) {
attachment.setName("");
return attachment;
}
@DisplayName("should keep last entry for representations")
@Test
void shouldKeepLastEntryForRepresentations() {
sendDepositAndCaptureCreateVorgang();
var eingang = grpcEingangCaptor.getValue();
var representationFiles = eingang.getRepresentationsList();
assertThat(getAttachmentVendorIds(representationFiles)).containsExactly(XML_ATTACHMENT_ID, PDF_ATTACHMENT_ID);
assertThat(getAttachmentFileNames(representationFiles)).containsExactly(XML_NAME, PDF_ATTACHMENT_NAME);
}
@DisplayName("should keep last entry for attachments")
@Test
void shouldKeepLastEntryForAttachments() {
sendDepositAndCaptureCreateVorgang();
var eingang = grpcEingangCaptor.getValue();
var attachmentFiles = eingang.getAttachmentsList().stream()
.map(GrpcIncomingFileGroup::getFilesList)
.flatMap(List::stream)
.toList();
assertThat(getAttachmentVendorIds(attachmentFiles)).containsExactly(PNG_ATTACHMENT_ID);
assertThat(getAttachmentFileNames(attachmentFiles)).containsExactly(PNG_ATTACHMENT_NAME);
}
private List<String> getAttachmentFileNames(List<GrpcIncomingFile> incomingFileList) {
return incomingFileList.stream()
.map(GrpcIncomingFile::getName)
.toList();
}
private List<String> getAttachmentVendorIds(List<GrpcIncomingFile> incomingFileList) {
return incomingFileList.stream()
.map(GrpcIncomingFile::getVendorId)
.toList();
}
}
@SneakyThrows
private void sendDepositAndCaptureCreateVorgang() {
mockClient.sendRequest(RequestCreators.withPayload(createEnvelopeSourceFromDepositData(depositData)))
.andExpect(ResponseMatchers.noFault())
.andExpect(ResponseMatchers.payload(getResource(RESPONSE)));
verify(vorgangRemoteService).createVorgang(formDataCaptor.capture(), grpcEingangCaptor.capture(), organisationsEinheitIdCaptor.capture());
}
@SneakyThrows
private Source createEnvelopeSourceFromDepositData(DepositData depositData) {
Deposit deposit = new Deposit();
deposit.setData(depositData);
JAXBElement<Deposit> depositJAXBElement = new JAXBElement<>(
new QName(NAMESPACE_URI, PAYLOAD_LOCAL_PART),
Deposit.class,
deposit);
var stringWriter = new StringWriter();
marshaller.marshal(depositJAXBElement, new StreamResult(stringWriter));
return new StreamSource(new StringReader(stringWriter.toString()));
}
@DisplayName("Send antrag with attachments")
@Nested
class TestAntragWithAttachments {
......
<myForm
xmlns:pdf="http://xmlns.cit.de/assistants/pdf"
xmlns:t="http://xmlns.cit.de/intelliform/transaction"
xmlns:u="http://xmlns.cit.de/intelliform/user" t:uuid="${uuid}" t:id="Gewerbeanmeldung-${transactionId}" t:timestamp="${now}" t:sender="stage.afm.schleswig-holstein.de" t:form="Gewerbeanmeldung" t:form-id="eGewerbe/eGewerbeAnmeldung" t:customer="Einheitlicher Ansprechpartner" t:customer-id="ea-sh" t:client="Schleswig-Holstein" t:client-id="land" u:FamilyNames="${antragsteller_nachname}" u:PrincipalType="Citizen" u:Username="${antragsteller_email}" u:CitizenProfileType="Standard" u:username="51522620-03d2-4507-b1f0-08d86920efed" u:GivenNames="${antragsteller_vorname}" u:AssuranceLevel="Low" u:displayName="${antragsteller_vorname} ${antragsteller_nachname}" u:mailAddress="${antragsteller_email}" u:EmailAddress="${antragsteller_email}" u:firstName="${antragsteller_vorname}" u:lastName="${antragsteller_nachname}" t:required-login-level="LOW" t:effective-login-level="LOW">
<GueltigAb>2021-12-01</GueltigAb>
<GrundAnmeldungSchluessel>01</GrundAnmeldungSchluessel>
<antragsteller>
<pers_anrede>${antragsteller_anrede}$${anrede_code}</pers_anrede>
<pers_nachname>${antragsteller_nachname}</pers_nachname>
<pers_vorname>${antragsteller_vorname}</pers_vorname>
<pers_geburtsname>${antragsteller_nachname}</pers_geburtsname>
<pers_geburtsdatum>2000-01-01</pers_geburtsdatum>
<pers_geburtsort>Hamburg</pers_geburtsort>
<pers_geburtsland>deutsch$Deutschland$000</pers_geburtsland>
<pers_staatsangehoerigkeit>deutsch$Deutschland$000</pers_staatsangehoerigkeit>
<b_anrede>${antragsteller_anrede}</b_anrede>
<b_anrede_schluesselnr>03</b_anrede_schluesselnr>
<b_geburtsland>Deutschland</b_geburtsland>
<b_geburtsland_signatur>000</b_geburtsland_signatur>
<b_staatsangehoerigkeit>deutsch</b_staatsangehoerigkeit>
<b_staatsangehoerigkeit_signatur>000</b_staatsangehoerigkeit_signatur>
<sh_strasse>Teststrasse</sh_strasse>
<sh_hausnummer>1000</sh_hausnummer>
<sh_plz>23795</sh_plz>
<ort_auswahl>9007404$01060005</ort_auswahl>
<ort>Bad Segeberg</ort>
<GebietID>9007404</GebietID>
<GebietBEZEICHNUNG>Bad Segeberg</GebietBEZEICHNUNG>
<GebietGNR94_GNR>01060005</GebietGNR94_GNR>
<staat>000</staat>
<iso3166numerisch>276</iso3166numerisch>
<kont_telefonnummer/>
<kont_mobilnummer/>
<kont_telefaxnummer/>
<kont_email>${antragsteller_email}</kont_email>
<kont_demail/>
<persoenlicheEignung>
<maengelvorhanden>false</maengelvorhanden>
<ermittlungsverfahren>false</ermittlungsverfahren>
<MitgliedschaftInVerboternerVereinigung>false</MitgliedschaftInVerboternerVereinigung>
</persoenlicheEignung>
</antragsteller>
<AnliegenID>8938634</AnliegenID>
<nameid>51522620-03d2-4507-b1f0-08d86920efed</nameid>
<rest_response_name>[{"membercontext":"51522620-03d2-4507-b1f0-08d86920efed","memberscope":[{"tenant":"SH","mailboxguid":"6824d573-ff26-434d-81ae-2c36740e3cb4","mailboxname":"","mailboxdescription":"","mailboxtype":1,"guid":"00000000-0000-0000-0000-000000000000","id":8121155}]}]</rest_response_name>
<mailboxguid>6824d573-ff26-434d-81ae-2c36740e3cb4</mailboxguid>
<NiederlassungArt>1</NiederlassungArt>
<IstReisegewerbe>true</IstReisegewerbe>
<BetriebArtIndustrie>false</BetriebArtIndustrie>
<BetriebArtHandwerk>true</BetriebArtHandwerk>
<BetriebArtHandel>false</BetriebArtHandel>
<BetriebArtSonstiges>false</BetriebArtSonstiges>
<rechtsform>nicht eingetragenes Einzelunternehmen</rechtsform>
<rfm>180</rfm>
<registerart/>
<min2gesellschafter>false</min2gesellschafter>
<gesetzlichervertreter>Inhaber</gesetzlichervertreter>
<Betrieb>
<ID>577575</ID>
<geschaeftsbezeichnung>Test</geschaeftsbezeichnung>
<EintragungPLZ/>
<EintragungOrt/>
<GerichtSchluessel/>
</Betrieb>
<sh_strasse>Hauptstraße</sh_strasse>
<sh_zusatz>oben links</sh_zusatz>
<sh_hausnummer>10</sh_hausnummer>
<sh_plz>24534</sh_plz>
<ort_auswahl>9006404$01004000</ort_auswahl>
<sh_ortsteil>Einfeld</sh_ortsteil>
<ort>Neumünster</ort>
<GebietID>9006404</GebietID>
<GebietBEZEICHNUNG>Neumünster</GebietBEZEICHNUNG>
<GebietGNR94_GNR>01004000</GebietGNR94_GNR>
<staat>000</staat>
<iso3166numerisch>276</iso3166numerisch>
<kont_telefonnummer>01234/332211</kont_telefonnummer>
<kont_telefaxnummer>01234/112233</kont_telefaxnummer>
<kont_email>${antragsteller_email}</kont_email>
<kont_demail>ea-poststelle@ea-sh.de-mail.de</kont_demail>
<kont_homepage>www.meineHomepage.de</kont_homepage>
<b_kont_vorwahl_telefon>01234</b_kont_vorwahl_telefon>
<b_kont_telefon>332211</b_kont_telefon>
<b_kont_vorwahl_telefax>01234</b_kont_vorwahl_telefax>
<b_kont_telefax>112233</b_kont_telefax>
<TaetigkeitenGesamt>
<TaetigkeitenGesamt-item>
<auswahl_oberbegriff>C</auswahl_oberbegriff>
<auswahl_kategorie>10</auswahl_kategorie>
<check_taetigkeitsschwerpunkt>true</check_taetigkeitsschwerpunkt>
<a_taetigkeit>ausgewählte Tätigkeit</a_taetigkeit>
<b_oberbegriff>C Verarbeitendes Gewerbe</b_oberbegriff>
<b_kategorie>10 Herstellung von Nahrungs- und Futtermitteln</b_kategorie>
<b_unterklasse>10.12.0 Schlachten von Geflügel</b_unterklasse>
<b_unterklasse_schluessel>10.12.0</b_unterklasse_schluessel>
<b_inkl>- Betrieb von Schlachthäusern, in denen Geflügel geschlachtet, zugerichtet und verpackt wird - Herstellung von frischem oder gefrorenem Geflügelfleisch in Einzelportionen - Auslassen von Geflügelfetten - Gewinnung von Federn und Daunen</b_inkl>
</TaetigkeitenGesamt-item>
<TaetigkeitenGesamt-item>
<auswahl_oberbegriff>D</auswahl_oberbegriff>
<auswahl_kategorie>35</auswahl_kategorie>
<check_taetigkeitsschwerpunkt>false</check_taetigkeitsschwerpunkt>
<a_taetigkeit>ausgewählte Tätigkeit 2</a_taetigkeit>
<b_oberbegriff>D Energieversorgung</b_oberbegriff>
<b_kategorie>35 Energieversorgung</b_kategorie>
<b_unterklasse>35.11.1 Elektrizitätserzeugung ohne Verteilung</b_unterklasse>
<b_unterklasse_schluessel>35.11.1</b_unterklasse_schluessel>
<b_inkl/>
</TaetigkeitenGesamt-item>
</TaetigkeitenGesamt>
<IstNebenerwerb>true</IstNebenerwerb>
<AnzahlVollzeitBeschaeftigte>3</AnzahlVollzeitBeschaeftigte>
<AnzahlTeilzeitBeschaeftigte>3</AnzahlTeilzeitBeschaeftigte>
<BeteiligtePerson>
<BeteiligtePerson-item>
<personFunktion>1</personFunktion>
<personFunktionText>Einzelgewerbetreibender</personFunktionText>
<doktorgradSchluessel>01</doktorgradSchluessel>
<doktorgrad>Prof.</doktorgrad>
<familienname>${antragsteller_nachname}</familienname>
<vorname>Test</vorname>
<geschlechtText>weiblich</geschlechtText>
<geschlecht>2</geschlecht>
<geburtsname>Geburtsname</geburtsname>
<geburtsdatum>2000-01-01</geburtsdatum>
<geburtsort>Bremen</geburtsort>
<geburtsland>Deutschland</geburtsland>
<geburtslandSchluesel>000</geburtslandSchluesel>
<staatsangehoerigkeit>deutsch</staatsangehoerigkeit>
<staatsangehoerigkeitSchluessel>000</staatsangehoerigkeitSchluessel>
<adr_strasse>Hauptstraße</adr_strasse>
<adr_zusatz>oben links</adr_zusatz>
<adr_hausnummer>10</adr_hausnummer>
<adr_plz>24534</adr_plz>
<adr_ort>Neumünster</adr_ort>
<adr_ortsteil>Einfeld</adr_ortsteil>
<adr_land>Deutschland$DE$DEU$276$.de</adr_land>
<b_adr_numerisch>276</b_adr_numerisch>
<b_adr_land>Deutschland</b_adr_land>
<b_adr_alpha2>DE</b_adr_alpha2>
<b_adr_alpha3>DEU</b_adr_alpha3>
<b_adr_domain>.de</b_adr_domain>
<kont_telefonnummer>01234/332211</kont_telefonnummer>
<kont_telefaxnummer>01234/112233</kont_telefaxnummer>
<kont_email>${antragsteller_email}</kont_email>
<kont_demail>ea-poststelle@ea-sh.de-mail.de</kont_demail>
<kont_homepage>www.meineHomepage.de</kont_homepage>
<b_kont_vorwahl_telefon>01234</b_kont_vorwahl_telefon>
<b_kont_telefon>332211</b_kont_telefon>
<b_kont_vorwahl_telefax>01234</b_kont_vorwahl_telefax>
<b_kont_telefax>112233</b_kont_telefax>
<Status_Erlaubnis>1</Status_Erlaubnis>
<b_Erlaubnis>Liegt vor</b_Erlaubnis>
<Status_Handwerkskarte>1</Status_Handwerkskarte>
<b_Handwerkskarte>Liegt vor</b_Handwerkskarte>
<Erlaubnis>
<AusgestelltAm>2021-10-25</AusgestelltAm>
<AusgestelltVonName>Handwerkskammer</AusgestelltVonName>
<AusgestelltVonPLZ>12334</AusgestelltVonPLZ>
<AusgestelltVonOrt>Woklenkuckucksheim</AusgestelltVonOrt>
<datei_erlaubnisvorbehalt>
<datei_erlaubnisvorbehalt-item>
<file content-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" description="" id="${fileid-docx1}" length="16242">Erlaubnis.docx</file>
</datei_erlaubnisvorbehalt-item>
</datei_erlaubnisvorbehalt>
</Erlaubnis>
<handwerkskarte>
<ausgestelltAm>2000-06-06</ausgestelltAm>
<ausgestelltVonSchluessel>00033</ausgestelltVonSchluessel>
<ausgestelltVonName>Aachen</ausgestelltVonName>
<datei_handwerkskarte>
<datei_handwerkskarte-item>
<file content-type="application/pdf" description="" id="${fileid-pdf1}" length="185763">Handwerkskarte.pdf</file>
</datei_handwerkskarte-item>
<datei_handwerkskarte-item>
<file content-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" description="" id="${fileid-docx2}" length="16230">Handwerkskarte.docx</file>
</datei_handwerkskarte-item>
</datei_handwerkskarte>
</handwerkskarte>
</BeteiligtePerson-item>
</BeteiligtePerson>
<datei_ausweis>
<datei_ausweis-item>
<file content-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" description="" id="${fileid-docx3}" length="16280">Anlagen2.docx</file>
</datei_ausweis-item>
<datei_ausweis-item>
<file content-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" description="" id="${fileid-docx4}" length="16249">Anlagen.docx</file>
</datei_ausweis-item>
</datei_ausweis>
<datei_meldebestaetigung>
<datei_meldebestaetigung-item>
<file content-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" description="" id="${fileid-docx5}" length="16273">Meldebestätigung.docx</file>
</datei_meldebestaetigung-item>
<datei_meldebestaetigung-item>
<file content-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" description="" id="${fileid-docx6}" length="16296">Meldebestätigung2.docx</file>
</datei_meldebestaetigung-item>
</datei_meldebestaetigung>
<datei_sonstiges>
<datei_sonstiges-item>
<file content-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" description="" id="${fileid-docx7}" length="16268">Sonstiges.docx</file>
</datei_sonstiges-item>
<datei_sonstiges-item>
<file content-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" description="" id="${fileid-docx8}" length="16292">Sonstiges2.docx</file>
</datei_sonstiges-item>
<datei_sonstiges-item>
<file content-type="application/pdf" description="" id="${fileid-pdf2}" length="187585">Anlage Vollmacht.pdf</file>
</datei_sonstiges-item>
<datei_sonstiges-item>
<file content-type="application/vnd.oasis.opendocument.text" description="" id="${fileid-odt1}" length="4799">Anlagen1.odt</file>
</datei_sonstiges-item>
<datei_sonstiges-item>
<file content-type="image/jpeg" description="" id="${fileid-jpg1}" length="10129">win.jpg</file>
</datei_sonstiges-item>
<datei_sonstiges-item>
<file content-type="image/png" description="" id="${fileid-png1}" length="50959">win.png</file>
</datei_sonstiges-item>
</datei_sonstiges>
<KontaktsystemTypA>233034600</KontaktsystemTypA>
<KontaktsystemTypB>233034601</KontaktsystemTypB>
<zustaendigestelle>
<OrganisationseinheitenAuswahl>244406514</OrganisationseinheitenAuswahl>
<OrganisationseinheitenID>${oeid}</OrganisationseinheitenID>
<OrganisationseinheitenBEZEICHNUNG>Ordnungsaufgaben, Wahlen, Gewerbeangelegenheiten der Stadt Neumünster</OrganisationseinheitenBEZEICHNUNG>
<strasse>Großflecken</strasse>
<hausnummer>63</hausnummer>
<postleitzahl>24534</postleitzahl>
<ortID>9006404</ortID>
<ort>Neumünster</ort>
<telefonnummer>+49 4321 942-0</telefonnummer>
<telefaxnummer>+49 4321 942-2521</telefaxnummer>
<emailadresse>ordnungsangelegenheiten@neumuenster.de</emailadresse>
<demailadresse/>
<AnliegenBEZEICHNUNG>Gewerbeanmeldung, Elektronische Gewerbeanzeige</AnliegenBEZEICHNUNG>
<leikaKEYLIST>99050012104000</leikaKEYLIST>
<kontaktsystem_kennung/>
<kontaktsystem_kennungzusatz/>
</zustaendigestelle>
<empfangendestelle>
<OrganisationseinheitenAuswahl>9068873</OrganisationseinheitenAuswahl>
<OrganisationseinheitenID>9068873</OrganisationseinheitenID>
<OrganisationseinheitenBEZEICHNUNG>Einheitlicher Ansprechpartner Schleswig-Holstein</OrganisationseinheitenBEZEICHNUNG>
<strasse>Reventlouallee</strasse>
<hausnummer>6</hausnummer>
<postleitzahl>24105</postleitzahl>
<ortID>9006402</ortID>
<ort>Kiel</ort>
<telefonnummer>+49 431 988-8650</telefonnummer>
<telefaxnummer>+49 431 988-6161111</telefaxnummer>
<emailadresse>info@ea-sh.de</emailadresse>
<demailadresse>ea-poststelle@ea-sh.de-mail.de</demailadresse>
<od_vorhanden>true</od_vorhanden>
<od_typid>233034600</od_typid>
<od_kennung>afmsh:9068873_AusnahmeLKWFahrverbot</od_kennung>
<od_zustellung_mail/>
<od_zustellung_nb>afmsh:9068873_AusnahmeLKWFahrverbot</od_zustellung_nb>
<od_zustellung_webservice/>
<od_kennungzusatz/>
<kontaktsystem_kennung>afmsh:9068873_AusnahmeLKWFahrverbot</kontaktsystem_kennung>
<kontaktsystem_kennungzusatz>alle</kontaktsystem_kennungzusatz>
</empfangendestelle>
<erklaerungen>
<check_gebuehren>true</check_gebuehren>
<check_richtigkeit>true</check_richtigkeit>
<check_datenschutz>true</check_datenschutz>
<check_missbrauch>true</check_missbrauch>
<check_hinweis>true</check_hinweis>
<b_gebuehren_beschriftung>* Die Gewerbeanmeldung ist kostenpflichtig. Die Höhe der Gebühren bemisst sich nach der Landesverordnung über Verwaltungsgebühren (Allgemeiner Gebührentarif) Tarifstelle 11.1.1 - VwGebV. Genaue Auskünfte hierzu erteilt das zuständige Gewerbeamt.</b_gebuehren_beschriftung>
<b_gebuehren_intro/>
<b_richtigkeit>* Ich bestätige die Richtigkeit meiner Angaben.</b_richtigkeit>
<b_datenschutz>* Ich erkläre mich damit einverstanden, dass der Einheitlicher Ansprechpartner Schleswig-Holstein zur Erfüllung seiner Aufgaben meine Daten unter Einhaltung der Bestimmungen der Datenschutz-Grundverordnung (DS-GVO) und des Landesdatenschutzgesetzes Schleswig-Holstein (LDSG-SH) speichert, verarbeitet und diese im Rahmen der gesetzlichen Bestimmungen an die für die Entscheidung zuständige Stelle weiterleitet. Ebenso bin ich mit der rechtskonformen Datenverarbeitung und Speicherung durch die zuständige Stelle einverstanden. Mir ist bekannt, dass ich die Einwilligung in die Verarbeitung und Übermittlung jederzeit gegenüber dem Einheitlicher Ansprechpartner Schleswig-Holstein, Reventlouallee 6, 24105 Kiel widerrufen kann. Ein Widerruf ist aber nur wirksam für die Zukunft. Verarbeitungen, die vor dem Widerruf erfolgt sind, sind davon nicht betroffen. Über die Verarbeitung meiner personenbezogenen Daten und die mir nach den datenschutzrechtlichen Regelungen zustehenden Ansprüche und Rechte habe ich unter Datenschutzerklärung Kenntnis erlangt.</b_datenschutz>
<b_missbrauch>* Mir ist bekannt, dass zur Verfolgung widerrechtlicher Nutzung die Daten meines zur Dateneingabe genutzten Endgerätes aufgezeichnet und verwendet werden können.</b_missbrauch>
<b_hinweis_beschriftung>* Diese Anzeige berechtigt nicht zum Beginn des Gewerbebetriebes, wenn noch eine Erlaubnis oder eine Eintragung in die Handwerksrolle notwendig ist. Zuwiderhandlungen können mit Geldbuße oder Geldstrafe oder Freiheitsstrafe geahndet werden. Diese Anzeige ist keine Genehmigung zur Errichtung einer Betriebsstätte entsprechend dem Planungs- und Baurecht.</b_hinweis_beschriftung>
<b_hinweis_intro>Hinweis</b_hinweis_intro>
<policyurl>http://wafmxqa002.dpaor.de/sh/datenschutz/datenschutzerklaerungEA_de.doc</policyurl>
</erklaerungen>
<b_timestamp>20211206093513</b_timestamp>
<logourl>http://wafmxqa002.dpaor.de/sh/logos/kopf_9068873.doc</logourl>
<fm>
<ansprechpartner>
<firmenname/>
<anrede>${antragsteller_anrede}</anrede>
<vorname>${antragsteller_vorname}</vorname>
<familienname>${antragsteller_nachname}</familienname>
<anschrift>
<strasse>Hauptstraße</strasse>
<hausnummer>10</hausnummer>
<postfach/>
<postleitzahl>24534</postleitzahl>
<ort>Neumünster</ort>
<ortsteil>Einfeld</ortsteil>
<zusatz>oben links</zusatz>
<staat>Deutschland</staat>
</anschrift>
<kontakt>
<telefonnummer>01234/332211</telefonnummer>
<mobilnummer/>
<telefaxnummer>01234/112233</telefaxnummer>
<emailadresse>${antragsteller_email}</emailadresse>
<demailadresse>ea-poststelle@ea-sh.de-mail.de</demailadresse>
</kontakt>
</ansprechpartner>
<verwaltungsleistungen>
<verwaltungsleistung>
<ausgewaehlte_zustaendigestelle>
<OrganisationseinheitenID>10363455</OrganisationseinheitenID>
<OrganisationseinheitenBEZEICHNUNG>Ordnungsaufgaben, Wahlen, Gewerbeangelegenheiten der Stadt Neumünster</OrganisationseinheitenBEZEICHNUNG>
</ausgewaehlte_zustaendigestelle>
<GebietID>9006404</GebietID>
<GebietBEZEICHNUNG>Neumünster</GebietBEZEICHNUNG>
<AnliegenID>8938634</AnliegenID>
<AnliegenBEZEICHNUNG>Gewerbeanmeldung, Elektronische Gewerbeanzeige</AnliegenBEZEICHNUNG>
<leikaKEYLIST>99050012104000</leikaKEYLIST>
<leikaBEZEICHNUNG/>
</verwaltungsleistung>
</verwaltungsleistungen>
</fm>
</myForm>
package de.ozgcloud.eingang.semantik.formbased.mantelantrag;
import java.util.Map;
import java.util.Optional;
import java.util.function.UnaryOperator;
import java.util.stream.IntStream;
import org.apache.commons.collections.MapUtils;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import de.ozgcloud.eingang.common.errorhandling.TechnicalException;
import de.ozgcloud.eingang.common.formdata.FormData;
import de.ozgcloud.eingang.common.formdata.ZustaendigeStelle;
import de.ozgcloud.eingang.semantik.formbased.FormBasedMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.collections.MapUtils;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import java.util.Map;
import java.util.Optional;
import java.util.function.UnaryOperator;
import java.util.stream.IntStream;
@Component
@RequiredArgsConstructor
@Log4j2
public class MantelantragFormBasedMapper implements FormBasedMapper {
static final String MANTELANTRAG_FORM_ID = "maa_mantelantrag/maa_mantelantrag_pvog";
public class MantelantragZustaendigeStelleMapper implements FormBasedMapper {
static final String MANTELANTRAG_FORM_ID = "maa_mantelantrag/maa_mantelantrag";
static final String ZUSTELLUNG_NACHRICHTENBROKER_FIELD = "zustellung_nachrichtenbroker";
static final String ORGANISATIONSEINHEIT_ID_FIELD = "kontaktsystem_oeid";
static final String BEZEICHNUNG_FIELD = "OrganisationseinheitenBEZEICHNUNG";
......
package de.ozgcloud.eingang.semantik.formbased.mantelantrag;
import static de.ozgcloud.eingang.semantik.formbased.mantelantrag.MantelantragFormBasedMapper.*;
import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Stream;
import de.ozgcloud.eingang.common.errorhandling.TechnicalException;
import de.ozgcloud.eingang.common.formdata.FormData;
import de.ozgcloud.eingang.common.formdata.FormDataTestFactory;
import de.ozgcloud.eingang.common.formdata.FormHeaderTestFactory;
import de.ozgcloud.eingang.common.formdata.ZustaendigeStelle;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
......@@ -22,19 +18,23 @@ import org.mockito.Mock;
import org.mockito.Spy;
import org.springframework.core.env.Environment;
import de.ozgcloud.eingang.common.errorhandling.TechnicalException;
import de.ozgcloud.eingang.common.formdata.FormData;
import de.ozgcloud.eingang.common.formdata.FormDataTestFactory;
import de.ozgcloud.eingang.common.formdata.FormHeaderTestFactory;
import de.ozgcloud.eingang.common.formdata.ZustaendigeStelle;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Stream;
import static de.ozgcloud.eingang.semantik.formbased.mantelantrag.MantelantragZustaendigeStelleMapper.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.*;
class MantelantragFormBasedMapperTest {
class MantelantragZustaendigeStelleMapperTest {
private final static String TARGET_OEID = "123456";
private static final String IDENTIFIER = "gea:test";
@Spy
@InjectMocks
private MantelantragFormBasedMapper mapper;
private MantelantragZustaendigeStelleMapper mapper;
@Mock
private Environment environment;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment