Added tests for the prototype adapter and fix adapter accordingly