fixing problems with previous tests, added new REST test