Test added to cover prepare() function