Currently, OptunaHub does not provide utilities to write unit tests for samplers. So some OptunaHub packages copy-and-paste the content of Optuna's test_samplers.py. Please check out the following files for details.
This issue proposes to provide utilities functions for checking these test scenarios and making unit tests DRY.