@Override
  public void doPut(HttpServletRequest req, HttpServletResponse resp) {
    resp.setContentType(CONTENT_TYPE);
    try (PrintWriter out = resp.getWriter()) {
      out.println(msgPartOne + " Put " + msgPartTwo);
    } catch (Exception e) {
      LOGGER.error("Exception occurred PUT request processing ", e);
    }
  }
@Test
  void testDoPut() throws Exception {
    HttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);
    HttpServletResponse mockResp = Mockito.mock(HttpServletResponse.class);
    StringWriter stringWriter = new StringWriter();
    PrintWriter printWriter = new PrintWriter(stringWriter);
    when(mockResp.getWriter()).thenReturn(printWriter);

    AppServlet curServlet = new AppServlet();
    curServlet.doPut(mockReq, mockResp);
    printWriter.flush();
    assertTrue(stringWriter.toString().contains(msgPartOne + " Put " + msgPartTwo));
  }