Check response code
@@ -39,6 +39,7 @@ public class ConnectorsITCase extends BaseITCase {
@Test
public void connectorListWithValidToken() {
ResponseEntity<ListResult> response = get("/api/v1/connectors", ListResult.class);
+ assertThat(response.getStatusCode()).as("component list status code").isEqualTo(HttpStatus.OK);
ListResult<Connector> result = response.getBody();
assertThat(result.getTotalCount()).as("connectors total").isEqualTo(2);
assertThat(result.getItems()).as("connector list").hasSize(2);
@@ -46,8 +47,9 @@ public class ConnectorsITCase extends BaseITCase {
@Test
public void connectorsGetTest() {
- ResponseEntity<Connector> result = get("/api/v1/connectors/twitter", Connector.class);
- Connector connector = result.getBody();
+ ResponseEntity<Connector> response = get("/api/v1/connectors/twitter", Connector.class);
+ assertThat(response.getStatusCode()).as("component list status code").isEqualTo(HttpStatus.OK);
+ Connector connector = response.getBody();
assertThat(connector).isNotNull();
assertThat(connector.getId()).contains("twitter");
}
