wrote test for setAdapterOptions
fix validateObject; wrote tests for it; add comments