A High Court judge is to decide if a hotel has breached planning rules by becoming a site for migrant accommodation.