I am using this method to set CONNECTION_TIMEOUT and SO_TIMEOUT
public void setConfig(ContentType contentType, Integer timeout) {
setConfig(SerenityRest.config()
.sslConfig(new SSLConfig().allowAllHostnames().relaxedHTTPSValidation())
.httpClient(HttpClientConfig.httpClientConfig()
.setParam(CoreConnectionPNames.CONNECTION_TIMEOUT, timeout)
.setParam(CoreConnectionPNames.SO_TIMEOUT, timeout)))
.addHeader(HttpHeaders.CONTENT_TYPE, contentType.toString());
}