Man charged in Alabama church shooting fighting mental test