### Question:
MetricUtils { public static RpcService startMetricsRpcService(Configuration configuration, String hostname) throws Exception { final String portRange = configuration.getString(MetricOptions.QUERY_SERVICE_PORT); final int threadPriority = configuration.getInteger(MetricOptions.QUERY_SERVICE_THREAD_PRIORITY); return AkkaRpcServiceUtils.createRpcService( hostname, portRange, configuration, METRICS_ACTOR_SYSTEM_NAME, new BootstrapTools.FixedThreadPoolExecutorConfiguration(1, 1, threadPriority)); } private  MetricUtils(); static JobManagerMetricGroup instantiateJobManagerMetricGroup(
			final MetricRegistry metricRegistry,
			final String hostname,
			final Optional<Time> systemResourceProbeInterval); static Tuple2<TaskManagerMetricGroup, MetricGroup> instantiateTaskManagerMetricGroup(
			MetricRegistry metricRegistry,
			String hostName,
			ResourceID resourceID,
			Optional<Time> systemResourceProbeInterval); static void instantiateStatusMetrics(
			MetricGroup metricGroup); static RpcService startMetricsRpcService(Configuration configuration, String hostname);  }### Answer:
@Test public void testStartMetricActorSystemRespectsThreadPriority() throws Exception { final Configuration configuration = new Configuration(); final int expectedThreadPriority = 3; configuration.setInteger(MetricOptions.QUERY_SERVICE_THREAD_PRIORITY, expectedThreadPriority); final RpcService rpcService = MetricUtils.startMetricsRpcService(configuration, "localhost"); assertThat(rpcService, instanceOf(AkkaRpcService.class)); final ActorSystem actorSystem = ((AkkaRpcService) rpcService).getActorSystem(); try { final int threadPriority = actorSystem.settings().config().getInt("akka.actor.default-dispatcher.thread-priority"); assertThat(threadPriority, is(expectedThreadPriority)); } finally { AkkaUtils.terminateActorSystem(actorSystem).get(); } }