From 1af924e8feacd3e47d02adf7a924628bab056c56 Mon Sep 17 00:00:00 2001
From: Anastasiia_Gelmut <anastasiia_gelmut@epam.com>
Date: Thu, 21 Jan 2021 14:42:37 +0400
Subject: [PATCH] GONRG-1599 Fixed partition integration test.

---
 .../osdu/partition/api/TestCreatePartition.java      | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/testing/partition-test-gcp/src/test/java/org/opengroup/osdu/partition/api/TestCreatePartition.java b/testing/partition-test-gcp/src/test/java/org/opengroup/osdu/partition/api/TestCreatePartition.java
index 07090d93b..31b9eb1f6 100644
--- a/testing/partition-test-gcp/src/test/java/org/opengroup/osdu/partition/api/TestCreatePartition.java
+++ b/testing/partition-test-gcp/src/test/java/org/opengroup/osdu/partition/api/TestCreatePartition.java
@@ -17,8 +17,12 @@
 
 package org.opengroup.osdu.partition.api;
 
+import static org.junit.Assert.assertEquals;
+
+import com.sun.jersey.api.client.ClientResponse;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Test;
 import org.opengroup.osdu.partition.util.GCPTestUtils;
 
 public class TestCreatePartition extends CreatePartitionTest {
@@ -34,4 +38,12 @@ public class TestCreatePartition extends CreatePartitionTest {
   public void tearDown() throws Exception {
     this.testUtils = null;
   }
+
+  @Override
+  @Test
+  public void should_return40XResponseCode_when_makingRequest_withInvalidPayload() throws Exception {
+    String invalidPayload = "invalidPayload";
+    ClientResponse response = descriptor.runWithCustomPayload(getId(), invalidPayload, testUtils.getAccessToken());
+    assertEquals(400, response.getStatus());
+  }
 }
-- 
GitLab