test_class.declarator: factory
test_class.modifier: private static
test_class.original_string: private static HttpServletResponseImplFactory factory;
test_class.type: HttpServletResponseImplFactory
test_class.var_name: factory
test_class.declarator: serviceUnavailableHandler
test_class.modifier: private static
test_class.original_string: private static ServiceUnavailableHandler serviceUnavailableHandler;
test_class.type: ServiceUnavailableHandler
test_class.var_name: serviceUnavailableHandler
test_class.declarator: outputStream
test_class.modifier: private static
test_class.original_string: private static ByteArrayOutputStream outputStream;
test_class.type: ByteArrayOutputStream
test_class.var_name: outputStream
test_class.declarator: printWriter
test_class.modifier: private static
test_class.original_string: private static PrintWriter printWriter;
test_class.type: PrintWriter
test_class.var_name: printWriter
test_class.file: http/src/test/java/ro/polak/http/ServiceUnavailableHandlerTest.java
test_class.identifier: ServiceUnavailableHandlerTest
test_case.body: @Test
      public void shouldIgnoreRunnableThatIsNotServerRunnable() throws Exception {
          serviceUnavailableHandler.rejectedExecution(mock(Runnable.class), null);
          verify(factory, never()).createFromSocket(any(Socket.class));
      }
test_case.class_method_signature: ServiceUnavailableHandlerTest.shouldIgnoreRunnableThatIsNotServerRunnable()
test_case.full_signature: @Test public void shouldIgnoreRunnableThatIsNotServerRunnable()
test_case.identifier: shouldIgnoreRunnableThatIsNotServerRunnable
test_case.invocations: rejectedExecution mock createFromSocket verify never any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldIgnoreRunnableThatIsNotServerRunnable()
focal_class.declarator: responseFactory
focal_class.modifier: private final
focal_class.original_string: private final HttpServletResponseImplFactory responseFactory;
focal_class.type: HttpServletResponseImplFactory
focal_class.var_name: responseFactory
focal_class.file: http/src/main/java/ro/polak/http/ServiceUnavailableHandler.java
focal_class.identifier: ServiceUnavailableHandler
focal_class.interfaces: implements RejectedExecutionHandler
focal_class.class_method_signature: ServiceUnavailableHandler.ServiceUnavailableHandler(final HttpServletResponseImplFactory responseFactory)
focal_class.full_signature: public  ServiceUnavailableHandler(final HttpServletResponseImplFactory responseFactory)
focal_class.identifier: ServiceUnavailableHandler
focal_class.modifiers: public
focal_class.parameters: (final HttpServletResponseImplFactory responseFactory)
focal_class.signature:  ServiceUnavailableHandler(final HttpServletResponseImplFactory responseFactory)
focal_class.class_method_signature: ServiceUnavailableHandler.rejectedExecution(final Runnable r, final ThreadPoolExecutor executor)
focal_class.full_signature: @Override public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor)
focal_class.identifier: rejectedExecution
focal_class.modifiers: @Override public
focal_class.parameters: (final Runnable r, final ThreadPoolExecutor executor)
focal_class.return: void
focal_class.signature: void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor)
focal_method.body: @Override
      public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) {
          if (r instanceof ServerRunnable) {
              Socket socket = ((ServerRunnable) r).getSocket();
              try {
                  (new HttpError503Handler()).serve(responseFactory.createFromSocket(socket));
              } catch (IOException e) {
              } finally {
                  IOUtilities.closeSilently(socket);
              }
          }
      }
focal_method.class_method_signature: ServiceUnavailableHandler.rejectedExecution(final Runnable r, final ThreadPoolExecutor executor)
focal_method.full_signature: @Override public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor)
focal_method.identifier: rejectedExecution
focal_method.invocations: getSocket serve createFromSocket closeSilently
focal_method.modifiers: @Override public
focal_method.parameters: (final Runnable r, final ThreadPoolExecutor executor)
focal_method.return: void
focal_method.signature: void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor)