So getJson() is used for testing, when you want to make a GET request to an endpoint, and the response you expect to be JSON
https://laravel.com/docs/master/http-tests#testing-json-apis
Then expectsJson() is actually wantsJson() and it is used on the request itself, you can use it in your controller, if you want to handle different response, for example if from your test you use the getJson() your controller should handle that, but you might want to also return view from the controller, so you will do something like this:
public function show(Request $request, User $user)
{
if($request->wantsJson())
{
return response()
->json(['user' => $user])
}
return view('users.show', compact('user'));
}
And you see above why the json() is used. So the response is JSON formatted.