[#642] Refactor datastore plugin configuration, improve (and fix ;-)) tests