- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {FileOutputStream f =
File file;new FileOutputStream(file)
String name;new FileOutputStream(name)
File file;new FileOutputStream(file, true)
- Smart code suggestions by Codota
}
/** * {@inheritDoc} */ @Override public void init(final ServletConfig servletConfig) throws ServletException { this.servletConfig = servletConfig; init(); }
@Override public void init() throws ServletException { super.init(); initializedCounter++; }
@Test public void shouldProvideContextAfterInitialization() throws ServletException { HttpServlet httpServlet = new SampleServlet(); ServletContext servletContext = mock(ServletContext.class); ServletConfig servletConfig = new ServletConfigImpl(servletContext); httpServlet.init(servletConfig); assertThat(httpServlet.getServletInfo(), is("")); assertThat(httpServlet.getServletContext(), is(equalTo(servletContext))); httpServlet.destroy(); }