Added bucket testing middleware