请帮我模拟下面的代码。无法模拟调用 JdbcTemplate 对象的 getDataSource()。
@Override
public List<AttributeThresholdRange> getThresholdsRangeForXHS(QueryThresholdsRequest queryThresholdsRequest) {
ArrayOfString attributeGroupIds = queryThresholdsRequest.getAttributeGroupIds();
Map<String, Object> queryParams = new HashMap<>();
queryParams.put("groupids", attributeGroupIds.getStrings());
return new NamedParameterJdbcTemplate(admDatabaseConnector.getJdbcTemplate().getDataSource())
.query(DBQueryConstants.ADM_QUERY_GET_THRESHOLDS_RANGE_FOR_XHS,
queryParams,
new ResultSetExtractor<List<AttributeThresholdRange>>() {
@Override
public List<AttributeThresholdRange> extractData(ResultSet resultSet) throws SQLException,DataAccessException {
return null;
}
});
}