// Path: src/test/java/no/cantara/cs/testsupport/BaseSystemTest.java
// @Test(groups = "system-test")
// public abstract class BaseSystemTest {
//     private TestServer testServer;
//     private ConfigServiceClient configServiceClient;
// 
//     @BeforeClass
//     @Parameters({ "persistenceType" })
//     public void startServer(@Optional("mapdb") String persistenceType) throws Exception {
//         if (persistenceType.equals("postgres")) {
//             testServer = new TestServerPostgres(getClass());
//         } else {
//             testServer = new TestServerMapDb(getClass());
//         }
//         testServer.cleanAllData();
//         testServer.start();
//         configServiceClient = testServer.getConfigServiceClient();
//     }
// 
//     @AfterClass
//     public void stop() {
//         if (testServer != null) {
//             testServer.stop();
//         }
//         configServiceClient.cleanApplicationState();
//     }
// 
//     public TestServer getTestServer() {
//         return testServer;
//     }
// 
//     public ConfigServiceClient getConfigServiceClient() {
//         return configServiceClient;
//     }
// 
//     public ConfigServiceAdminClient getConfigServiceAdminClient() {
//         return testServer.getAdminClient();
//     }
// }
// 
// Path: src/test/java/no/cantara/cs/testsupport/TestServer.java
// public interface TestServer {
//     String USERNAME = "read";
//     String PASSWORD = "baretillesing";
//     String ADMIN_USERNAME = "admin";
//     String ADMIN_PASSWORD = "configservice";
// 
//     void cleanAllData() throws Exception;
// 
//     void start() throws InterruptedException;
// 
//     void stop();
// 
//     ConfigServiceClient getConfigServiceClient();
// 
//     ConfigServiceAdminClient getAdminClient();
// }


import com.jayway.restassured.http.ContentType;
import no.cantara.cs.dto.CheckForUpdateRequest;
import no.cantara.cs.testsupport.BaseSystemTest;
import no.cantara.cs.testsupport.TestServer;
import org.apache.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import static com.jayway.restassured.RestAssured.given;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;
package no.cantara.cs.client;




public class CheckForUpdateTest extends BaseSystemTest {

    private ConfigServiceClient configServiceClient;

    @BeforeClass
    public void startServer() throws Exception {
        configServiceClient = getConfigServiceClient();
    }

    @Test
    public void testCheckForUpdateBrokenJson() {
        given()
// Path: src/test/java/no/cantara/cs/testsupport/BaseSystemTest.java
// @Test(groups = "system-test")
// public abstract class BaseSystemTest {
//     private TestServer testServer;
//     private ConfigServiceClient configServiceClient;
// 
//     @BeforeClass
//     @Parameters({ "persistenceType" })
//     public void startServer(@Optional("mapdb") String persistenceType) throws Exception {
//         if (persistenceType.equals("postgres")) {
//             testServer = new TestServerPostgres(getClass());
//         } else {
//             testServer = new TestServerMapDb(getClass());
//         }
//         testServer.cleanAllData();
//         testServer.start();
//         configServiceClient = testServer.getConfigServiceClient();
//     }
// 
//     @AfterClass
//     public void stop() {
//         if (testServer != null) {
//             testServer.stop();
//         }
//         configServiceClient.cleanApplicationState();
//     }
// 
//     public TestServer getTestServer() {
//         return testServer;
//     }
// 
//     public ConfigServiceClient getConfigServiceClient() {
//         return configServiceClient;
//     }
// 
//     public ConfigServiceAdminClient getConfigServiceAdminClient() {
//         return testServer.getAdminClient();
//     }
// }
// 
// Path: src/test/java/no/cantara/cs/testsupport/TestServer.java
// public interface TestServer {
//     String USERNAME = "read";
//     String PASSWORD = "baretillesing";
//     String ADMIN_USERNAME = "admin";
//     String ADMIN_PASSWORD = "configservice";
// 
//     void cleanAllData() throws Exception;
// 
//     void start() throws InterruptedException;
// 
//     void stop();
// 
//     ConfigServiceClient getConfigServiceClient();
// 
//     ConfigServiceAdminClient getAdminClient();
// }


// Path: src/test/java/no/cantara/cs/client/CheckForUpdateTest.java
import com.jayway.restassured.http.ContentType;
import no.cantara.cs.dto.CheckForUpdateRequest;
import no.cantara.cs.testsupport.BaseSystemTest;
import no.cantara.cs.testsupport.TestServer;
import org.apache.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import static com.jayway.restassured.RestAssured.given;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;

package no.cantara.cs.client;




public class CheckForUpdateTest extends BaseSystemTest {

    private ConfigServiceClient configServiceClient;

    @BeforeClass
    public void startServer() throws Exception {
        configServiceClient = getConfigServiceClient();
    }

    @Test
    public void testCheckForUpdateBrokenJson() {
        given()
                .auth().basic(TestServer.USERNAME, TestServer.PASSWORD)