标签: rest post junit
我正在努力寻找一种解决方案,以便对POST回复中的空体进行否定测试。
RestResponse<Allgemein> response = repository.postForEntity(..)
现在我想做类似的事情
assertResponseStatusBadRequest(response);
但是由于它是POST请求,因此该请求将以OK状态返回。
在POST回复中测试空体的最佳解决方案是什么?我正在使用Spring。