// Path: src/main/java/com/tomtom/services/configuration/ConfigurationServiceProperties.java
// @SuppressWarnings("squid:S2637")
// public class ConfigurationServiceProperties implements HasProperties {
// 
//     @Nonnull
//     private final String startupConfigurationURI;
// 
//     @Inject
//     public ConfigurationServiceProperties(
//             @Named("ConfigurationService.startupConfigurationURI") @Nonnull final String startupConfigurationURI) {
//         this.startupConfigurationURI = startupConfigurationURI.trim();
//     }
// 
//     @Nonnull
//     public String getStartupConfigurationURI() {
//         return startupConfigurationURI;
//     }
// }


import com.tomtom.services.configuration.ConfigurationServiceProperties;
import com.tomtom.speedtools.maven.MavenProperties;
import com.tomtom.speedtools.rest.Reactor;
import com.tomtom.speedtools.rest.ResourceProcessor;
import com.tomtom.speedtools.testutils.SimpleExecutionContext;
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer;
import org.joda.time.DateTime;
import org.junit.After;
import org.junit.Before;
import scala.concurrent.ExecutionContext;
import javax.annotation.Nonnull;
/*
 * Copyright (C) 2012-2021, TomTom (http://tomtom.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.tomtom.services.configuration.implementation;



@SuppressWarnings("JUnitTestMethodWithNoAssertions")
public class LocalTestServer {
    private static final int PORT = 8081;
    private static final String HOST = "http://localhost:";

    final private TJWSEmbeddedJaxrsServer server;
    private final String config;
    private final int port;

    public LocalTestServer(@Nonnull final String config) {
        this.config = config;
        this.port = PORT;
        server = new TJWSEmbeddedJaxrsServer();
        server.setPort(port);
    }

    @Before
    public void startServer() throws IncorrectConfigurationException {
// Path: src/main/java/com/tomtom/services/configuration/ConfigurationServiceProperties.java
// @SuppressWarnings("squid:S2637")
// public class ConfigurationServiceProperties implements HasProperties {
// 
//     @Nonnull
//     private final String startupConfigurationURI;
// 
//     @Inject
//     public ConfigurationServiceProperties(
//             @Named("ConfigurationService.startupConfigurationURI") @Nonnull final String startupConfigurationURI) {
//         this.startupConfigurationURI = startupConfigurationURI.trim();
//     }
// 
//     @Nonnull
//     public String getStartupConfigurationURI() {
//         return startupConfigurationURI;
//     }
// }


// Path: src/test/java/com/tomtom/services/configuration/implementation/LocalTestServer.java
import com.tomtom.services.configuration.ConfigurationServiceProperties;
import com.tomtom.speedtools.maven.MavenProperties;
import com.tomtom.speedtools.rest.Reactor;
import com.tomtom.speedtools.rest.ResourceProcessor;
import com.tomtom.speedtools.testutils.SimpleExecutionContext;
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer;
import org.joda.time.DateTime;
import org.junit.After;
import org.junit.Before;
import scala.concurrent.ExecutionContext;
import javax.annotation.Nonnull;

/*
 * Copyright (C) 2012-2021, TomTom (http://tomtom.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.tomtom.services.configuration.implementation;



@SuppressWarnings("JUnitTestMethodWithNoAssertions")
public class LocalTestServer {
    private static final int PORT = 8081;
    private static final String HOST = "http://localhost:";

    final private TJWSEmbeddedJaxrsServer server;
    private final String config;
    private final int port;

    public LocalTestServer(@Nonnull final String config) {
        this.config = config;
        this.port = PORT;
        server = new TJWSEmbeddedJaxrsServer();
        server.setPort(port);
    }

    @Before
    public void startServer() throws IncorrectConfigurationException {
        final ConfigurationServiceProperties configurationServiceProperties =