I have written my test case as below and got the below error,

Error in Log:

> 
> FAILED: setpassword java.lang.AssertionError: 1 expectation failed.
>  Expected status code <200> but was <302>.
> 
> 
> 

Code: 

```
@Test(enabled=true)

public void setpassword(){
    RequestSpecification requestSpecification= new Config().getRequestSpecification();
    RequestSpecification requestHeaders= new Config().getHeaders();

    Map<String,String> password = new HashMap<String, String>();
    password.put("password", "Password@2017");
        given().spec(requestSpecification).spec(requestHeaders).body(password).when().post("https://example.com/testplatform@example.com/password").
    then().statusCode(200).log().all();

}

```