test_class.file: OpenSOC-Pcap_Service/src/test/java/com/opensoc/pcapservice/PcapGetterHBaseImplTest.java
test_class.identifier: PcapGetterHBaseImplTest
test_case.body: @SuppressWarnings("unchecked")
    @Test
    public void test_getPcaps_withKey() throws IOException {
      // mocking
      String key = "0a07002b-0a078039-06-1e8b-0087";
      PcapGetterHBaseImpl pcapGetter = (PcapGetterHBaseImpl) PcapGetterHBaseImpl
          .getInstance();
      PcapGetterHBaseImpl spy = Mockito.spy(pcapGetter);
  
      List<byte[]> mockPcaps = new ArrayList<byte[]>();
      mockPcaps.add(getTestPcapBytes());
  
      // //
      // Mockito.doReturn(mockPcaps).when(spy).scanPcaps(Mockito.any(ArrayList.class),
      // Mockito.any(HTable.class), Mockito.any(Scan.class),
      // Mockito.any(byte[].class), Mockito.any(byte[].class));
      //
  
      // actual call
      // PcapsResponse response = spy.getPcaps(key);
  
      // verify
      // Assert.assertTrue(response.getResponseSize() == mockPcaps.get(0).length);
    }
test_case.class_method_signature: PcapGetterHBaseImplTest.test_getPcaps_withKey()
test_case.full_signature: @SuppressWarnings("unchecked") @Test public void test_getPcaps_withKey()
test_case.identifier: test_getPcaps_withKey
test_case.invocations: getInstance spy add getTestPcapBytes
test_case.modifiers: @SuppressWarnings("unchecked") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_getPcaps_withKey()
focal_class.declarator: pcapGetterHBase = null
focal_class.modifier: private static
focal_class.original_string: private static IPcapGetter pcapGetterHBase = null;
focal_class.type: IPcapGetter
focal_class.var_name: pcapGetterHBase
focal_class.declarator: LOGGER = Logger
        .getLogger(PcapGetterHBaseImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger
        .getLogger(PcapGetterHBaseImpl.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: OpenSOC-Pcap_Service/src/main/java/com/opensoc/pcapservice/PcapGetterHBaseImpl.java
focal_class.identifier: PcapGetterHBaseImpl
focal_class.interfaces: implements IPcapGetter
focal_class.class_method_signature: PcapGetterHBaseImpl.index()
focal_class.full_signature: @GET @Path("pcap/test") @Produces("text/html") public Response index()
focal_class.identifier: index
focal_class.modifiers: @GET @Path("pcap/test") @Produces("text/html") public
focal_class.parameters: ()
focal_class.return: Response
focal_class.signature: Response index()
focal_class.class_method_signature: PcapGetterHBaseImpl.getPcaps(List<String> keys, String lastRowKey,
        long startTime, long endTime, boolean includeReverseTraffic,
        boolean includeDuplicateLastRow, long maxResultSize)
focal_class.full_signature: public PcapsResponse getPcaps(List<String> keys, String lastRowKey,
        long startTime, long endTime, boolean includeReverseTraffic,
        boolean includeDuplicateLastRow, long maxResultSize)
focal_class.identifier: getPcaps
focal_class.modifiers: public
focal_class.parameters: (List<String> keys, String lastRowKey,
        long startTime, long endTime, boolean includeReverseTraffic,
        boolean includeDuplicateLastRow, long maxResultSize)
focal_class.return: PcapsResponse
focal_class.signature: PcapsResponse getPcaps(List<String> keys, String lastRowKey,
        long startTime, long endTime, boolean includeReverseTraffic,
        boolean includeDuplicateLastRow, long maxResultSize)
focal_class.class_method_signature: PcapGetterHBaseImpl.getPcaps(String key, long startTime, long endTime,
        boolean includeReverseTraffic)
focal_class.full_signature: public PcapsResponse getPcaps(String key, long startTime, long endTime,
        boolean includeReverseTraffic)
focal_class.identifier: getPcaps
focal_class.modifiers: public
focal_class.parameters: (String key, long startTime, long endTime,
        boolean includeReverseTraffic)
focal_class.return: PcapsResponse
focal_class.signature: PcapsResponse getPcaps(String key, long startTime, long endTime,
        boolean includeReverseTraffic)
focal_class.class_method_signature: PcapGetterHBaseImpl.getPcaps(List<String> keys)
focal_class.full_signature: public PcapsResponse getPcaps(List<String> keys)
focal_class.identifier: getPcaps
focal_class.modifiers: public
focal_class.parameters: (List<String> keys)
focal_class.return: PcapsResponse
focal_class.signature: PcapsResponse getPcaps(List<String> keys)
focal_class.class_method_signature: PcapGetterHBaseImpl.getPcaps(String key)
focal_class.full_signature: public PcapsResponse getPcaps(String key)
focal_class.identifier: getPcaps
focal_class.modifiers: public
focal_class.parameters: (String key)
focal_class.return: PcapsResponse
focal_class.signature: PcapsResponse getPcaps(String key)
focal_class.class_method_signature: PcapGetterHBaseImpl.getInstance()
focal_class.full_signature: public static IPcapGetter getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: IPcapGetter
focal_class.signature: IPcapGetter getInstance()
focal_class.class_method_signature: PcapGetterHBaseImpl.PcapGetterHBaseImpl()
focal_class.full_signature: private  PcapGetterHBaseImpl()
focal_class.identifier: PcapGetterHBaseImpl
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  PcapGetterHBaseImpl()
focal_class.class_method_signature: PcapGetterHBaseImpl.sortKeysByAscOrder(List<String> keys,
        boolean includeReverseTraffic)
focal_class.full_signature: @VisibleForTesting List<String> sortKeysByAscOrder(List<String> keys,
        boolean includeReverseTraffic)
focal_class.identifier: sortKeysByAscOrder
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (List<String> keys,
        boolean includeReverseTraffic)
focal_class.return: List<String>
focal_class.signature: List<String> sortKeysByAscOrder(List<String> keys,
        boolean includeReverseTraffic)
focal_class.class_method_signature: PcapGetterHBaseImpl.removeDuplicateKeys(List<String> keys)
focal_class.full_signature: @VisibleForTesting public List<String> removeDuplicateKeys(List<String> keys)
focal_class.identifier: removeDuplicateKeys
focal_class.modifiers: @VisibleForTesting public
focal_class.parameters: (List<String> keys)
focal_class.return: List<String>
focal_class.signature: List<String> removeDuplicateKeys(List<String> keys)
focal_class.class_method_signature: PcapGetterHBaseImpl.getUnprocessedSublistOfKeys(List<String> keys,
        String lastRowKey)
focal_class.full_signature: @VisibleForTesting List<String> getUnprocessedSublistOfKeys(List<String> keys,
        String lastRowKey)
focal_class.identifier: getUnprocessedSublistOfKeys
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (List<String> keys,
        String lastRowKey)
focal_class.return: List<String>
focal_class.signature: List<String> getUnprocessedSublistOfKeys(List<String> keys,
        String lastRowKey)
focal_class.class_method_signature: PcapGetterHBaseImpl.getTokens(String key, int noOfTokens)
focal_class.full_signature: @VisibleForTesting String getTokens(String key, int noOfTokens)
focal_class.identifier: getTokens
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (String key, int noOfTokens)
focal_class.return: String
focal_class.signature: String getTokens(String key, int noOfTokens)
focal_class.class_method_signature: PcapGetterHBaseImpl.processKey(PcapsResponse pcapsResponse, String key,
        long startTime, long endTime, boolean isPartialResponse,
        boolean includeDuplicateLastRow, long maxResultSize)
focal_class.full_signature: @VisibleForTesting PcapsResponse processKey(PcapsResponse pcapsResponse, String key,
        long startTime, long endTime, boolean isPartialResponse,
        boolean includeDuplicateLastRow, long maxResultSize)
focal_class.identifier: processKey
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (PcapsResponse pcapsResponse, String key,
        long startTime, long endTime, boolean isPartialResponse,
        boolean includeDuplicateLastRow, long maxResultSize)
focal_class.return: PcapsResponse
focal_class.signature: PcapsResponse processKey(PcapsResponse pcapsResponse, String key,
        long startTime, long endTime, boolean isPartialResponse,
        boolean includeDuplicateLastRow, long maxResultSize)
focal_class.class_method_signature: PcapGetterHBaseImpl.addToResponse(PcapsResponse pcapsResponse,
        List<Cell> scannedCells, long maxResultSize)
focal_class.full_signature: private void addToResponse(PcapsResponse pcapsResponse,
        List<Cell> scannedCells, long maxResultSize)
focal_class.identifier: addToResponse
focal_class.modifiers: private
focal_class.parameters: (PcapsResponse pcapsResponse,
        List<Cell> scannedCells, long maxResultSize)
focal_class.return: void
focal_class.signature: void addToResponse(PcapsResponse pcapsResponse,
        List<Cell> scannedCells, long maxResultSize)
focal_class.class_method_signature: PcapGetterHBaseImpl.createStartAndStopRowKeys(String key,
        boolean isLastRowKey, boolean includeDuplicateLastRow)
focal_class.full_signature: @VisibleForTesting Map<String, String> createStartAndStopRowKeys(String key,
        boolean isLastRowKey, boolean includeDuplicateLastRow)
focal_class.identifier: createStartAndStopRowKeys
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (String key,
        boolean isLastRowKey, boolean includeDuplicateLastRow)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> createStartAndStopRowKeys(String key,
        boolean isLastRowKey, boolean includeDuplicateLastRow)
focal_class.class_method_signature: PcapGetterHBaseImpl.checkIfValidInput(List<String> keys, String lastRowKey)
focal_class.full_signature: @VisibleForTesting boolean checkIfValidInput(List<String> keys, String lastRowKey)
focal_class.identifier: checkIfValidInput
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (List<String> keys, String lastRowKey)
focal_class.return: boolean
focal_class.signature: boolean checkIfValidInput(List<String> keys, String lastRowKey)
focal_class.class_method_signature: PcapGetterHBaseImpl.executeGetRequest(HTable table, Get get)
focal_class.full_signature: private List<Cell> executeGetRequest(HTable table, Get get)
focal_class.identifier: executeGetRequest
focal_class.modifiers: private
focal_class.parameters: (HTable table, Get get)
focal_class.return: List<Cell>
focal_class.signature: List<Cell> executeGetRequest(HTable table, Get get)
focal_class.class_method_signature: PcapGetterHBaseImpl.executeScanRequest(HTable table, Scan scan)
focal_class.full_signature: private List<Cell> executeScanRequest(HTable table, Scan scan)
focal_class.identifier: executeScanRequest
focal_class.modifiers: private
focal_class.parameters: (HTable table, Scan scan)
focal_class.return: List<Cell>
focal_class.signature: List<Cell> executeScanRequest(HTable table, Scan scan)
focal_class.class_method_signature: PcapGetterHBaseImpl.createGetRequest(String key, long startTime, long endTime)
focal_class.full_signature: @VisibleForTesting Get createGetRequest(String key, long startTime, long endTime)
focal_class.identifier: createGetRequest
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (String key, long startTime, long endTime)
focal_class.return: Get
focal_class.signature: Get createGetRequest(String key, long startTime, long endTime)
focal_class.class_method_signature: PcapGetterHBaseImpl.createScanRequest(PcapsResponse pcapsResponse,
        Map<String, String> keysMap, long startTime, long endTime,
        long maxResultSize)
focal_class.full_signature: @VisibleForTesting Scan createScanRequest(PcapsResponse pcapsResponse,
        Map<String, String> keysMap, long startTime, long endTime,
        long maxResultSize)
focal_class.identifier: createScanRequest
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (PcapsResponse pcapsResponse,
        Map<String, String> keysMap, long startTime, long endTime,
        long maxResultSize)
focal_class.return: Scan
focal_class.signature: Scan createScanRequest(PcapsResponse pcapsResponse,
        Map<String, String> keysMap, long startTime, long endTime,
        long maxResultSize)
focal_class.class_method_signature: PcapGetterHBaseImpl.setTimeRangeOnScan(Scan scan, long startTime, long endTime)
focal_class.full_signature: private void setTimeRangeOnScan(Scan scan, long startTime, long endTime)
focal_class.identifier: setTimeRangeOnScan
focal_class.modifiers: private
focal_class.parameters: (Scan scan, long startTime, long endTime)
focal_class.return: void
focal_class.signature: void setTimeRangeOnScan(Scan scan, long startTime, long endTime)
focal_class.class_method_signature: PcapGetterHBaseImpl.setTimeRangeOnGet(Get get, long startTime, long endTime)
focal_class.full_signature: private void setTimeRangeOnGet(Get get, long startTime, long endTime)
focal_class.identifier: setTimeRangeOnGet
focal_class.modifiers: private
focal_class.parameters: (Get get, long startTime, long endTime)
focal_class.return: void
focal_class.signature: void setTimeRangeOnGet(Get get, long startTime, long endTime)
focal_class.class_method_signature: PcapGetterHBaseImpl.getMinLimitForAppendingTokens()
focal_class.full_signature: private String getMinLimitForAppendingTokens()
focal_class.identifier: getMinLimitForAppendingTokens
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getMinLimitForAppendingTokens()
focal_class.class_method_signature: PcapGetterHBaseImpl.getMaxLimitForAppendingTokens()
focal_class.full_signature: private String getMaxLimitForAppendingTokens()
focal_class.identifier: getMaxLimitForAppendingTokens
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getMaxLimitForAppendingTokens()
focal_class.class_method_signature: PcapGetterHBaseImpl.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_class.class_method_signature: PcapGetterHBaseImpl.usage()
focal_class.full_signature: private static void usage()
focal_class.identifier: usage
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void usage()
focal_method.body: public static IPcapGetter getInstance() throws IOException {
      if (pcapGetterHBase == null) {
        synchronized (PcapGetterHBaseImpl.class) {
          if (pcapGetterHBase == null) {
            pcapGetterHBase = new PcapGetterHBaseImpl();
          }
        }
      }
      return pcapGetterHBase;
    }
focal_method.class_method_signature: PcapGetterHBaseImpl.getInstance()
focal_method.full_signature: public static IPcapGetter getInstance()
focal_method.identifier: getInstance
focal_method.modifiers: public static
focal_method.parameters: ()
focal_method.return: IPcapGetter
focal_method.signature: IPcapGetter getInstance()