add metric name verification to the java library. fix the tests to not have invalid metric names.