Joshua, it turns out was once named Hosea but then Moses sends him as one of Twelve spies to Canaan after first renaming him Joshua. Ten of the spies try to convince the Israelites that it would be better to go back to being slaves in Egypt than enter the Promised Land because if they tried to conquer Canaan they'd get killed. Joshua and Caleb said that if they came to the Promised Land, God would make sure they would survive against their enemies just like He had saved them from Egypt. 