By faith Joseph, when his end was near, spoke about the exodus of the Israelites from Egypt and gave instructions about his bones.
Joseph held to the promises of God. He knew that the Israelites would not stay in Egypt. He knew that eventually they would leave. When he spoke of it, he spoke of something that would happen, not something that could happen. He knew this with such assurety that he even told them to take his bones with them.