test_class.declarator: cacheTask
test_class.modifier: @Mock
test_class.original_string: @Mock
    CacheTask<Object, Object> cacheTask;
test_class.type: CacheTask<Object, Object>
test_class.var_name: cacheTask
test_class.declarator: cacheTasks
test_class.modifier: @Mock
test_class.original_string: @Mock
    BlockingQueue<CacheTask<Object, Object>> cacheTasks;
test_class.type: BlockingQueue<CacheTask<Object, Object>>
test_class.var_name: cacheTasks
test_class.declarator: asyncEvictionListener
test_class.original_string: ScheduledEvictionListener<Object, Object> asyncEvictionListener;
test_class.type: ScheduledEvictionListener<Object, Object>
test_class.var_name: asyncEvictionListener
test_class.file: imcache-core/src/test/java/com/cetsoft/imcache/cache/async/ScheduledEvictionListenerTest.java
test_class.identifier: ScheduledEvictionListenerTest
test_case.body: @Test
    @SuppressWarnings({"unchecked", "rawtypes"})
    public void drainQueue() {
      final TasksHolder tasksHolder = new TasksHolder();
      doReturn(false).doReturn(true).when(cacheTasks).isEmpty();
      doAnswer(new Answer() {
        public Object answer(InvocationOnMock invocation) throws Throwable {
          List<CacheTask<Object, Object>> tasks = (List<CacheTask<Object, Object>>) invocation
              .getArguments()[0];
          tasks.add(cacheTask);
          tasksHolder.tasks = tasks;
          return null;
        }
      }).when(cacheTasks).drainTo(anyList(), anyInt());
      doNothing().when(asyncEvictionListener).save(anyList());
      asyncEvictionListener.drainQueue();
      assertEquals(cacheTask, tasksHolder.tasks.get(0));
    }
test_case.class_method_signature: ScheduledEvictionListenerTest.drainQueue()
test_case.full_signature: @Test @SuppressWarnings({"unchecked", "rawtypes"}) public void drainQueue()
test_case.identifier: drainQueue
test_case.invocations: isEmpty when doReturn doReturn drainTo when doAnswer getArguments add anyList anyInt save when doNothing anyList drainQueue assertEquals get
test_case.modifiers: @Test @SuppressWarnings({"unchecked", "rawtypes"}) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void drainQueue()
focal_class.declarator: DEFAULT_PERIOD = 3000
focal_class.modifier: public static final
focal_class.original_string: public static final long DEFAULT_PERIOD = 3000;
focal_class.type: long
focal_class.var_name: DEFAULT_PERIOD
focal_class.declarator: NO_OF_EVICTION_DRAINERS = new AtomicInteger()
focal_class.modifier: private static final
focal_class.original_string: private static final AtomicInteger NO_OF_EVICTION_DRAINERS = new AtomicInteger();
focal_class.type: AtomicInteger
focal_class.var_name: NO_OF_EVICTION_DRAINERS
focal_class.file: imcache-core/src/main/java/com/cetsoft/imcache/cache/async/ScheduledEvictionListener.java
focal_class.identifier: ScheduledEvictionListener
focal_class.class_method_signature: ScheduledEvictionListener.ScheduledEvictionListener()
focal_class.full_signature: public  ScheduledEvictionListener()
focal_class.identifier: ScheduledEvictionListener
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ScheduledEvictionListener()
focal_class.class_method_signature: ScheduledEvictionListener.ScheduledEvictionListener(final int batchSize, final long period, final int queueSize)
focal_class.full_signature: public  ScheduledEvictionListener(final int batchSize, final long period, final int queueSize)
focal_class.identifier: ScheduledEvictionListener
focal_class.modifiers: public
focal_class.parameters: (final int batchSize, final long period, final int queueSize)
focal_class.signature:  ScheduledEvictionListener(final int batchSize, final long period, final int queueSize)
focal_class.class_method_signature: ScheduledEvictionListener.init(final long period, final int queueSize)
focal_class.full_signature: protected void init(final long period, final int queueSize)
focal_class.identifier: init
focal_class.modifiers: protected
focal_class.parameters: (final long period, final int queueSize)
focal_class.return: void
focal_class.signature: void init(final long period, final int queueSize)
focal_class.class_method_signature: ScheduledEvictionListener.drainQueue()
focal_class.full_signature: @Override protected void drainQueue()
focal_class.identifier: drainQueue
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void drainQueue()
focal_class.superclass: extends QueuingEvictionListener<K, V>
focal_method.body: @Override
    protected void drainQueue() {
      while (!cacheTasks.isEmpty()) {
        super.drainQueue();
      }
    }
focal_method.class_method_signature: ScheduledEvictionListener.drainQueue()
focal_method.full_signature: @Override protected void drainQueue()
focal_method.identifier: drainQueue
focal_method.invocations: isEmpty drainQueue
focal_method.modifiers: @Override protected
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void drainQueue()