Under the Bankruptcy Code

https://b-ok.cc/book/1225779/037f5d

Under the Bankruptcy Code, what is the means test used for?
What is a court likely to do if it finds the use of Chapter 7 would constitute substantial abuse?
If a voluntary petition in bankruptcy is found to be proper, would the court’s entry of an order for relief put an automatic stay into place?