SchemaProviderServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  SchemaProviderServlet(String stubConfigSchemaLocation, BufferedReaderFactory bufferedReaderFactory);   }
@Test public void testDoPostShouldCallDoGet() throws ServletException, IOException { String nullString = null; given(bufferedReaderFactory.createBufferedReader(SCHEMA)).willReturn(reader); given(reader.readLine()).willReturn("first line", nullString); underTest.doPost(request, response); verify(writer).write(Mockito.anyString()); }