@Test
  public void testReadProcessorLocality() throws Exception {
    URL url = new URL(webApp.getUrl().toString() + "locality?processorId=" + PROCESSOR_ID1);
    String response = HttpUtil.read(url, 1000, new ExponentialSleepStrategy());

    assertEquals("Mismatch in the locality for processor " + PROCESSOR_ID1,
        mapper.readValue(response, ProcessorLocality.class), PROCESSOR_1_LOCALITY);
  }
A test class for {@link LocalityServlet}. It validates the servlet directly and Serde Mix-In of {@link ProcessorLocality}
indirectly.
samza-yarn3/src/test/java/org/apache/samza/webapp/TestLocalityServlet.java