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 07090d93b9e29977968fd56269a73a7df527a57c..31b9eb1f65216e0a8be37e7cffee36c056f72f8b 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()); + } }