diff --git a/docs/installation/server.md b/docs/installation/server.md index b6d3c71..aaf5160 100644 --- a/docs/installation/server.md +++ b/docs/installation/server.md @@ -1,6 +1,6 @@ ### Install Oxalis Inbound (Server) -Oxalis server comes out of the box with a folder for extensions (named "ext"). Extract the content of _oxalis-as4-4.1.1-dist.zip_ into this folder. No further configuration is needed. +Oxalis server comes out of the box with a folder for extensions (named "ext"). Extract the content of _oxalis-as4-4.1.2-dist.zip_ into this folder. No further configuration is needed. Start Oxalis server in the normal way, either trough _run.sh_ or _run.bat_. diff --git a/docs/installation/tomcat.md b/docs/installation/tomcat.md index 324c2ec..1db7a40 100644 --- a/docs/installation/tomcat.md +++ b/docs/installation/tomcat.md @@ -6,7 +6,7 @@ First you should download the [oxalis-war-4.1.0.war](https://github.com/difi/oxa from this [page](https://github.com/difi/oxalis/releases) and put it a directory of your choice. We recommend naming the folder oxalis. -Then you should download the [Oxalis-AS4 distribution](https://github.com/difi/Oxalis-AS4/releases/download/4.1.1/oxalis-as4-4.1.1-dist.zip) +Then you should download the [Oxalis-AS4 distribution](https://github.com/difi/Oxalis-AS4/releases/download/4.1.2/oxalis-as4-4.1.2-dist.zip) from this [page](https://github.com/difi/Oxalis-AS4/releases) and unzip the files to a new folder of your choice. We recommend creating a folder named as4 inside the folder containing the WAR file. diff --git a/pom.xml b/pom.xml index 2bb284f..97ef2eb 100755 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,5 @@ - + 4.0.0 @@ -31,13 +32,13 @@ oxalis-as4 - 4.1.1 + 4.1.2-SNAPSHOT jar Oxalis :: AS4 - Library holding classes and stuff pertaining to AS4 - https://github.com/difi/oxalis + Extension adding AS4 support to Oxalis + https://github.com/difi/Oxalis-AS4 https://github.com/difi/oxalis-as4/issues @@ -45,17 +46,65 @@ - Norwegian Agency for Public Management and eGovernment (Difi) - http://www.difi.no/ + Norwegian Digitalisation Agency + https://www.digdir.no/ + + + Frode Bjerkholt + frode.bjerholt@digdir.no + Norwegian Digitalisation Agency + https://www.digdir.no/ + + + Martin Wam + martin.wam@digdir.no + Norwegian Digitalisation Agency + https://www.digdir.no/ + + + + + + GNU Lesser General Public License (LGPL), Version 3.0 + http://www.gnu.org/licenses/lgpl-3.0.txt + repo + + + European Union Public Licence (EUPL v.1.1) + https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 + repo + + + + + scm:git:git@github.com:difi/Oxalis-AS4.git + scm:git:git@github.com:difi/Oxalis-AS4.git + http://github.com/difi/Oxalis-AS4 + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + UTF-8 1.8 1.8 + 0.9.5 + + 3.3.5 + 2.2.4 + 3.1.1 + 1.4.0 + 2.0.0 - 3.3.4 + 2.10.0 @@ -67,74 +116,68 @@ no.difi.oxalis - oxalis-test - test + oxalis-api + provided + - no.difi.oxalis - oxalis-outbound - test + no.difi.vefa + peppol-common + provided - - javax.servlet - javax.servlet-api + no.difi.vefa + peppol-sbdh provided - - org.slf4j - slf4j-api + no.difi.vefa + peppol-security provided - org.apache.cxf - cxf-rt-features-logging - ${cxf.version} + no.difi.vefa + peppol-mode + provided - - ch.qos.logback - logback-classic - test + no.difi.commons + commons-sbdh + ${commons.sbdh} + provided - + - org.apache.httpcomponents - httpclient - provided + org.apache.cxf + cxf-core + ${cxf.version} - commons-io - commons-io - 2.6 + org.apache.cxf + cxf-rt-security + ${cxf.version} - - com.google.guava - guava - + org.apache.cxf + cxf-rt-bindings-soap + ${cxf.version} - - org.slf4j - jcl-over-slf4j - provided + org.apache.cxf + cxf-rt-databinding-jaxb + ${cxf.version} - - - org.bouncycastle - bcmail-jdk15on - provided + org.apache.cxf + cxf-rt-wsdl + ${cxf.version} - org.apache.cxf - cxf-core + cxf-rt-features-logging ${cxf.version} @@ -163,14 +206,104 @@ + + + + org.apache.wss4j + wss4j-ws-security-common + ${wss4j.version} + + + geronimo-javamail_1.4_mail + org.apache.geronimo.javamail + + + + + org.apache.wss4j + wss4j-ws-security-dom + ${wss4j.version} + + + org.apache.wss4j + wss4j-policy + ${wss4j.version} + + + + + jakarta.xml.bind + jakarta.xml.bind-api + 2.3.2 + + + jakarta.activation + jakarta.activation-api + 1.2.1 + + + + + org.bouncycastle + bcpkix-jdk15on + ${bouncycastle.version} + provided + + + org.bouncycastle + bcprov-jdk15on + ${bouncycastle.version} + provided + + + javax.servlet + javax.servlet-api + provided + - javax.mail - mail + org.slf4j + slf4j-api + provided + + commons-io + commons-io + 2.6 + + + commons-codec + commons-codec + provided + + + com.google.guava + guava + provided + + + + io.opentracing + opentracing-noop + provided + + + com.google.inject + guice + provided + + + javax.inject + javax.inject + provided + + + org.apache.neethi + neethi + ${neethi.version} + - com.google.inject.extensions guice-servlet @@ -184,33 +317,69 @@ provided + + + no.difi.oxalis + oxalis-test + test + + + no.difi.oxalis + oxalis-outbound + test + junit junit 4.12 test + + org.testng + testng + test + org.powermock powermock-module-junit4 ${powermock.version} test + + org.powermock + powermock-core + ${powermock.version} + test + + + org.powermock + powermock-reflect + ${powermock.version} + test + org.powermock powermock-api-mockito2 ${powermock.version} test + org.mockito mockito-core - 2.10.0 + ${mockito.version} test + + + src/main/resources + true + + + org.jvnet.jaxb2.maven2 @@ -300,54 +469,64 @@ org.apache.maven.plugins - maven-source-plugin + maven-dependency-plugin + 3.1.1 - attach-sources + analyze - jar + analyze-only + + true + true + + commons-codec:commons-codec + org.kohsuke.metainf-services:metainf-services + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://oss.sonatype.org/ + false + + - - - GNU Lesser General Public License (LGPL), Version 3.0 - http://www.gnu.org/licenses/lgpl-3.0.txt - repo - - - European Union Public Licence (EUPL v.1.1) - https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 - repo - - - - release-sign-artifacts - - - performRelease - true - - + release org.apache.maven.plugins - maven-javadoc-plugin + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + org.apache.maven.plugins - maven-source-plugin - 3.2.1 + maven-javadoc-plugin + 2.9.1 - package-sources + attach-javadocs jar @@ -357,7 +536,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 1.5 sign-artifacts diff --git a/src/main/java/no/difi/oxalis/as4/inbound/AS4StatusServlet.java b/src/main/java/no/difi/oxalis/as4/inbound/AS4StatusServlet.java new file mode 100644 index 0000000..64b81a6 --- /dev/null +++ b/src/main/java/no/difi/oxalis/as4/inbound/AS4StatusServlet.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010-2018 Norwegian Agency for Public Management and eGovernment (Difi) + * + * Licensed under the EUPL, Version 1.1 or – as soon they + * will be approved by the European Commission - subsequent + * versions of the EUPL (the "Licence"); + * + * You may not use this work except in compliance with the Licence. + * + * You may obtain a copy of the Licence at: + * + * https://joinup.ec.europa.eu/community/eupl/og_page/eupl + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the Licence is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the Licence for the specific language governing + * permissions and limitations under the Licence. + */ + +package no.difi.oxalis.as4.inbound; + +import com.google.inject.Inject; +import com.google.inject.Singleton; +import no.difi.vefa.peppol.mode.Mode; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; + +/** + * Servlet returning diagnostic information to ease operation, support and debugging. + * Since this servlet is public accessible, it should NOT contain any sensitive + * information about it's runtime environment. + */ +@Singleton +public class AS4StatusServlet extends HttpServlet { + + private final Mode mode; + + @Inject + public AS4StatusServlet(Mode mode) { + this.mode = mode; + } + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { + resp.setContentType("text/plain"); + + PrintWriter writer = resp.getWriter(); + writer.println("version.oxalis.as4: " + OxalisAS4Version.getVersion()); + writer.println("version.java: " + System.getProperty("java.version")); + writer.println("mode: " + mode.getIdentifier()); + } +} diff --git a/src/main/java/no/difi/oxalis/as4/inbound/As4EndpointsPublisherImpl.java b/src/main/java/no/difi/oxalis/as4/inbound/As4EndpointsPublisherImpl.java index 99d23d6..7dc09e9 100644 --- a/src/main/java/no/difi/oxalis/as4/inbound/As4EndpointsPublisherImpl.java +++ b/src/main/java/no/difi/oxalis/as4/inbound/As4EndpointsPublisherImpl.java @@ -35,7 +35,7 @@ public class As4EndpointsPublisherImpl implements As4EndpointsPublisher { private As4Interceptor oxalisAs4Interceptor; @Inject - private SetPolicyOutInterceptor setPolicyInInterceptor; + private SetPolicyInInterceptor setPolicyInInterceptor; @Inject private SetPolicyOutInterceptor setPolicyOutInterceptor; diff --git a/src/main/java/no/difi/oxalis/as4/inbound/As4InboundModule.java b/src/main/java/no/difi/oxalis/as4/inbound/As4InboundModule.java index 5a489ea..bf2e589 100755 --- a/src/main/java/no/difi/oxalis/as4/inbound/As4InboundModule.java +++ b/src/main/java/no/difi/oxalis/as4/inbound/As4InboundModule.java @@ -24,6 +24,7 @@ protected void configureServlets() { bind(As4EndpointsPublisher.class).to(As4EndpointsPublisherImpl.class); bind(As4InboundHandler.class); - serve("/as4*").with(Key.get(HttpServlet.class, Names.named("oxalis-as4"))); + serve("/as4").with(Key.get(HttpServlet.class, Names.named("oxalis-as4"))); + serve("/as4/status").with(AS4StatusServlet.class); } } diff --git a/src/main/java/no/difi/oxalis/as4/inbound/OxalisAS4Version.java b/src/main/java/no/difi/oxalis/as4/inbound/OxalisAS4Version.java new file mode 100644 index 0000000..5f17784 --- /dev/null +++ b/src/main/java/no/difi/oxalis/as4/inbound/OxalisAS4Version.java @@ -0,0 +1,53 @@ +/* + * Copyright 2010-2018 Norwegian Agency for Public Management and eGovernment (Difi) + * + * Licensed under the EUPL, Version 1.1 or – as soon they + * will be approved by the European Commission - subsequent + * versions of the EUPL (the "Licence"); + * + * You may not use this work except in compliance with the Licence. + * + * You may obtain a copy of the Licence at: + * + * https://joinup.ec.europa.eu/community/eupl/og_page/eupl + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the Licence is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the Licence for the specific language governing + * permissions and limitations under the Licence. + */ + +package no.difi.oxalis.as4.inbound; + +import no.difi.oxalis.api.lang.OxalisLoadingException; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +/** + * Provides access to selected Maven injected properties in the oxalis-as4-version.properties file. + */ +public class OxalisAS4Version { + + private static Properties properties; + + static { + try (InputStream inputStream = OxalisAS4Version.class.getResourceAsStream("/oxalis-as4-version.properties")) { + properties = new Properties(); + properties.load(inputStream); + } catch (IOException e) { + throw new OxalisLoadingException(e.getMessage(), e); + } + } + + /** + * The Oxalis version, taken from the POM + */ + public static String getVersion() { + return properties.getProperty("oxalis.version"); + } +} diff --git a/src/main/java/no/difi/oxalis/as4/outbound/As4MessageSender.java b/src/main/java/no/difi/oxalis/as4/outbound/As4MessageSender.java index 6b09d4f..dbc00b2 100644 --- a/src/main/java/no/difi/oxalis/as4/outbound/As4MessageSender.java +++ b/src/main/java/no/difi/oxalis/as4/outbound/As4MessageSender.java @@ -76,14 +76,20 @@ public class As4MessageSender { private PolicyService policyService; public TransmissionResponse send(TransmissionRequest request) throws OxalisAs4TransmissionException { - Dispatch dispatch = createDispatch(request); - Collection attachments = prepareAttachments(request); - dispatch.getRequestContext().put(Message.ATTACHMENTS, attachments); - - Messaging messaging = messagingProvider.createMessagingHeader(request, attachments); - SoapHeader header = getSoapHeader(messaging); - dispatch.getRequestContext().put(Header.HEADER_LIST, new ArrayList<>(Collections.singletonList(header))); + try (DispatchImpl dispatch = createDispatch(request)) { + Collection attachments = prepareAttachments(request); + dispatch.getRequestContext().put(Message.ATTACHMENTS, attachments); + + Messaging messaging = messagingProvider.createMessagingHeader(request, attachments); + SoapHeader header = getSoapHeader(messaging); + dispatch.getRequestContext().put(Header.HEADER_LIST, new ArrayList<>(Collections.singletonList(header))); + return invoke(request, dispatch); + } catch (IOException e) { + throw new OxalisAs4TransmissionException("Failed to send message", e); + } + } + private TransmissionResponse invoke(TransmissionRequest request, DispatchImpl dispatch) throws OxalisAs4TransmissionException { try { SOAPMessage response = dispatch.invoke(null); return transmissionResponseConverter.convert(request, response); @@ -137,14 +143,14 @@ private String getContentID(TransmissionRequest request) { return messageIdGenerator.generate(); } - private Dispatch createDispatch(TransmissionRequest request) throws OxalisAs4TransmissionException { - Dispatch dispatch = getService(request) + private DispatchImpl createDispatch(TransmissionRequest request) throws OxalisAs4TransmissionException { + DispatchImpl dispatch = (DispatchImpl) getService(request) .createDispatch(PORT_NAME, SOAPMessage.class, Service.Mode.MESSAGE); dispatch.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, request.getEndpoint().getAddress().toString()); configureSecurity(request, dispatch); - final Client client = ((DispatchImpl) dispatch).getClient(); + final Client client = dispatch.getClient(); if (CEF_CONFORMANCE.equalsIgnoreCase(as4settings.getString(As4Conf.TYPE))) { client.getInInterceptors().add(getLoggingBeforeSecurityInInterceptor()); diff --git a/src/main/java/no/difi/oxalis/as4/util/SoapMessageUtil.java b/src/main/java/no/difi/oxalis/as4/util/SoapMessageUtil.java deleted file mode 100644 index b8ef013..0000000 --- a/src/main/java/no/difi/oxalis/as4/util/SoapMessageUtil.java +++ /dev/null @@ -1,94 +0,0 @@ -package no.difi.oxalis.as4.util; - -import lombok.SneakyThrows; -import lombok.experimental.UtilityClass; -import no.difi.oxalis.as4.lang.OxalisAs4Exception; -import org.apache.cxf.attachment.AttachmentDataSource; -import org.apache.cxf.helpers.CastUtils; -import org.oasis_open.docs.ebxml_msg.ebms.v3_0.ns.core._200704.UserMessage; - -import javax.mail.BodyPart; -import javax.mail.Header; -import javax.mail.internet.MimeMultipart; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.namespace.QName; -import javax.xml.soap.*; -import java.io.InputStream; -import java.util.Collections; - -@UtilityClass -public class SoapMessageUtil { - - public static SOAPMessage loadSample(String resource, String contentType) { - return loadSample(SoapMessageUtil.class.getResourceAsStream(resource), contentType); - } - - @SneakyThrows - public static SOAPMessage loadSample(InputStream is, String contentType) { - - MimeMultipart multipart = new MimeMultipart( - new AttachmentDataSource(contentType, is)); - - BodyPart soapPart = multipart.getBodyPart(0); - SOAPMessage message = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL) - .createMessage(null, soapPart.getInputStream()); - - for (int i = 1; i < multipart.getCount(); ++i) { - BodyPart bodyPart = multipart.getBodyPart(i); - AttachmentPart attachmentPart = message.createAttachmentPart(bodyPart.getDataHandler()); - - Collections.list(CastUtils.cast(bodyPart.getAllHeaders(), Header.class)) - .stream() - .filter(p -> attachmentPart.getMimeHeader(p.getName()) == null) - .forEach(p -> attachmentPart.addMimeHeader(p.getName(), p.getValue())); - - message.addAttachmentPart(attachmentPart); - } - - message.saveChanges(); - return message; - } - - public static SOAPHeaderElement addResponseHeader(SOAPMessage message, QName qname) throws OxalisAs4Exception { - try { - SOAPHeaderElement messagingHeader = message.getSOAPHeader().addHeaderElement(qname); - messagingHeader.setMustUnderstand(true); - return messagingHeader; - } catch (SOAPException e) { - throw new OxalisAs4Exception("Could not create SOAP header", e); - } - } - - private static SOAPMessage getSOAPMessage() throws OxalisAs4Exception { - try { - return createMessageFactory().createMessage(); - } catch (SOAPException e) { - throw new OxalisAs4Exception("Could not create SOAP message", e); - } - } - - private static MessageFactory createMessageFactory() throws SOAPException { - return MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL); - } - - private static void marshall(QName qname, Class clazz, T t, Node node) throws OxalisAs4Exception { - try { - getMarshaller().marshal(new JAXBElement<>(qname, clazz, t), node); - } catch (JAXBException e) { - throw new OxalisAs4Exception("Could not marshal signal message to header", e); - } - } - - private static Marshaller getMarshaller() throws JAXBException { - return Marshalling.getInstance().createMarshaller(); - } - - public static SOAPMessage createSoapMessage(UserMessage userMessage) throws OxalisAs4Exception { - SOAPMessage message = getSOAPMessage(); - SOAPHeaderElement messagingHeader = addResponseHeader(message, Constants.MESSAGING_QNAME); - marshall(Constants.USER_MESSAGE_QNAME, UserMessage.class, userMessage, messagingHeader); - return message; - } -} diff --git a/src/main/resources/oxalis-as4-version.properties b/src/main/resources/oxalis-as4-version.properties new file mode 100644 index 0000000..e9ec194 --- /dev/null +++ b/src/main/resources/oxalis-as4-version.properties @@ -0,0 +1 @@ +oxalis.version=${project.version} diff --git a/src/test/java/no/difi/oxalis/as4/SendReceiveTest.java b/src/test/java/no/difi/oxalis/as4/SendReceiveTest.java index 26258dd..d9e7a88 100755 --- a/src/test/java/no/difi/oxalis/as4/SendReceiveTest.java +++ b/src/test/java/no/difi/oxalis/as4/SendReceiveTest.java @@ -67,7 +67,6 @@ public SendReceiveTest() throws Exception { @Override public Injector getInjector() { return Guice.createInjector( -// new As4OutboundModule(), new As4InboundModule(), Modules.override(new GuiceModuleLoader()).with(new AbstractModule() { @Override diff --git a/src/test/java/no/difi/oxalis/as4/inbound/AS4StatusServletTest.java b/src/test/java/no/difi/oxalis/as4/inbound/AS4StatusServletTest.java new file mode 100644 index 0000000..37c17e5 --- /dev/null +++ b/src/test/java/no/difi/oxalis/as4/inbound/AS4StatusServletTest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010-2018 Norwegian Agency for Public Management and eGovernment (Difi) + * + * Licensed under the EUPL, Version 1.1 or – as soon they + * will be approved by the European Commission - subsequent + * versions of the EUPL (the "Licence"); + * + * You may not use this work except in compliance with the Licence. + * + * You may obtain a copy of the Licence at: + * + * https://joinup.ec.europa.eu/community/eupl/og_page/eupl + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the Licence is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * See the Licence for the specific language governing + * permissions and limitations under the Licence. + */ + +package no.difi.oxalis.as4.inbound; + +import com.google.inject.AbstractModule; +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.google.inject.util.Modules; +import no.difi.oxalis.api.inbound.InboundService; +import no.difi.oxalis.commons.guice.GuiceModuleLoader; +import no.difi.oxalis.test.jetty.AbstractJettyServerTest; +import org.testng.Assert; +import org.testng.annotations.Test; + +import javax.servlet.http.HttpServletResponse; +import java.net.HttpURLConnection; +import java.net.URL; + +@Test +public class AS4StatusServletTest extends AbstractJettyServerTest { + + @Override + public Injector getInjector() { + return Guice.createInjector( + new As4InboundModule(), + Modules.override(new GuiceModuleLoader()).with(new AbstractModule() { + @Override + protected void configure() { +// bind(ReceiptPersister.class).toInstance((m, p) -> { +// }); +// bind(PayloadPersister.class).toInstance(temporaryFilePersister); + bind(InboundService.class).toInstance(p -> {}); +// bind(MessageIdGenerator.class).toInstance(new DefaultMessageIdGenerator("test.com")); + } + }) + ); + } + + @Test + public void get() throws Exception { + HttpURLConnection httpURLConnection = + (HttpURLConnection) new URL("http://localhost:8080/as4/status").openConnection(); + + Assert.assertEquals(httpURLConnection.getResponseCode(), HttpServletResponse.SC_OK); + } +} diff --git a/src/test/java/no/difi/oxalis/as4/inbound/As4ServletTest.java b/src/test/java/no/difi/oxalis/as4/inbound/As4ServletTest.java index 31bb75c..4fc9c94 100644 --- a/src/test/java/no/difi/oxalis/as4/inbound/As4ServletTest.java +++ b/src/test/java/no/difi/oxalis/as4/inbound/As4ServletTest.java @@ -37,36 +37,9 @@ public void beforeTest() { MockitoAnnotations.initMocks(this); } - @BeforeMethod public void beforeMethod() { trustStore = generateEmptyKeyStore(); Whitebox.setInternalState(servlet, "trustStore", trustStore); } - -// -// @Test -// public void extendTrustStore_validLocation() throws Exception{ -// -// Path path = new File(getClass().getClassLoader() -// .getResource("oxalis_home/peppol_trust_g2.jks").getFile()).toPath(); -// -// when(trustStoreSettings.getPath(any(TrustStore.class), any(Path.class))).thenReturn(path); -// when(trustStoreSettings.getString(any(TrustStore.class))).thenReturn("changeit"); -// -// assertEquals(trustStore.size(), 0, "precondition: trustStore empty"); -// servlet.extendTrustStore(); -// assertEquals(trustStore.size(), 4, "trustStore expanded with 4 entries"); -// -// } -// -// @Test -// public void extendTrustStore_noneLocation() throws Exception{ -// Path path = Paths.get("None"); -// when(trustStoreSettings.getPath(any(TrustStore.class), any(Path.class))).thenReturn(path); -// -// assertEquals(trustStore.size(), 0, "precondition: trustStore empty"); -// servlet.extendTrustStore(); -// assertEquals(trustStore.size(), 0, "trustStore remains empty"); -// } }