### Question:
TenantFileUploadServlet extends FileUploadServlet { @Override protected void setUploadSizeMax(final ServletFileUpload serviceFileUpload, final HttpServletRequest request) { serviceFileUpload.setFileSizeMax(getConsoleProperties(getAPISession(request).getTenantId()).getMaxSize() * MEGABYTE); }    }### Answer:
@Test public void should_throw_fileTooBigException_when_file_is_bigger_in_than_conf_file() throws Exception { final ServletFileUpload serviceFileUpload = mock(ServletFileUpload.class); when(consoleProperties.getMaxSize()).thenReturn(1L); fileUploadServlet.setUploadSizeMax(serviceFileUpload, request); verify(serviceFileUpload).setFileSizeMax(FileUploadServlet.MEGABYTE); }