404 Error Handling Inside Plug?

You could write a controller test that looks something like the following

test "this thing halts", %{conn: conn} do
  conn = get(conn, some_path(conn, :index)
  assert conn.halted
end