Formation of an eta-mesic nucleus