test_class.declarator: metafile
test_class.modifier: private
test_class.original_string: private Metafile metafile;
test_class.type: Metafile
test_class.var_name: metafile
test_class.declarator: blockManipulationService
test_class.modifier: private
test_class.original_string: private IBlockManipulationService blockManipulationService;
test_class.type: IBlockManipulationService
test_class.var_name: blockManipulationService
test_class.file: block_manipulation_service/src/test/java/com/stnetix/ariaddna/blockmanipulation/service/BlockManipulationServiceImplTest.java
test_class.identifier: BlockManipulationServiceImplTest
test_case.body: @Test(expected = BlockDoesNotExistException.class)
      public void getBlockUuidByNumber()
              throws BlockDoesNotExistException, MetafileIsFolderException {
          Map<String, String> properties = new HashMap<>();
          properties.put("typeOnFs", FileType.FILE_BIN.toString());
          metafile.setProperties(properties);
          String blockUuid1 = UUID.randomUUID().toString();
          String blockUuid2 = UUID.randomUUID().toString();
          String blockUuid3 = UUID.randomUUID().toString();
          String blockUuid4 = UUID.randomUUID().toString();
          String blockUuid5 = UUID.randomUUID().toString();
          metafile.addBlockUuid(blockUuid1);
          metafile.addBlockUuid(blockUuid2);
          metafile.addBlockUuid(blockUuid3);
          metafile.addBlockUuid(blockUuid4);
          metafile.addBlockUuid(blockUuid5);
  
          String blockUuid = blockManipulationService.getBlockUuidByNumber(metafile, 0);
          assertEquals(blockUuid1, blockUuid);
  
          blockUuid = blockManipulationService.getBlockUuidByNumber(metafile, 1);
          assertEquals(blockUuid2, blockUuid);
  
          //here it throws exception
          blockManipulationService.getBlockUuidByNumber(metafile, 9);
      }
test_case.class_method_signature: BlockManipulationServiceImplTest.getBlockUuidByNumber()
test_case.full_signature: @Test(expected = BlockDoesNotExistException.class) public void getBlockUuidByNumber()
test_case.identifier: getBlockUuidByNumber
test_case.invocations: put toString setProperties toString randomUUID toString randomUUID toString randomUUID toString randomUUID toString randomUUID addBlockUuid addBlockUuid addBlockUuid addBlockUuid addBlockUuid getBlockUuidByNumber assertEquals getBlockUuidByNumber assertEquals getBlockUuidByNumber
test_case.modifiers: @Test(expected = BlockDoesNotExistException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getBlockUuidByNumber()
focal_class.declarator: blockUuidList
focal_class.modifier: private
focal_class.original_string: private List<String> blockUuidList;
focal_class.type: List<String>
focal_class.var_name: blockUuidList
focal_class.file: block_manipulation_service/src/main/java/com/stnetix/ariaddna/blockmanipulation/service/BlockManipulationServiceImpl.java
focal_class.identifier: BlockManipulationServiceImpl
focal_class.interfaces: implements IBlockManipulationService
focal_class.class_method_signature: BlockManipulationServiceImpl.getNextBlockUuid(Metafile metafile)
focal_class.full_signature: @Override public String getNextBlockUuid(Metafile metafile)
focal_class.identifier: getNextBlockUuid
focal_class.modifiers: @Override public
focal_class.parameters: (Metafile metafile)
focal_class.return: String
focal_class.signature: String getNextBlockUuid(Metafile metafile)
focal_class.class_method_signature: BlockManipulationServiceImpl.getBlockUuidByNumber(Metafile metafile, int blockNumber)
focal_class.full_signature: @Override public String getBlockUuidByNumber(Metafile metafile, int blockNumber)
focal_class.identifier: getBlockUuidByNumber
focal_class.modifiers: @Override public
focal_class.parameters: (Metafile metafile, int blockNumber)
focal_class.return: String
focal_class.signature: String getBlockUuidByNumber(Metafile metafile, int blockNumber)
focal_class.class_method_signature: BlockManipulationServiceImpl.getMetafileInfoForLog(Metafile metafile, String methodName)
focal_class.full_signature: private StringBuilder getMetafileInfoForLog(Metafile metafile, String methodName)
focal_class.identifier: getMetafileInfoForLog
focal_class.modifiers: private
focal_class.parameters: (Metafile metafile, String methodName)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder getMetafileInfoForLog(Metafile metafile, String methodName)
focal_method.body: @Override
      public String getBlockUuidByNumber(Metafile metafile, int blockNumber)
              throws MetafileIsFolderException, BlockDoesNotExistException {
          List<String> blockUuidList = metafile.getBlockUuidList();
          if (metafile.getProperties().containsValue(FileType.DIR.toString())) {
              StringBuilder sb = new StringBuilder();
              sb.append(getMetafileInfoForLog(metafile, "getBlockUuidByNumber"));
              sb.append(", is folder.");
              throw new MetafileIsFolderException(sb.toString());
          } else {
              if (blockUuidList.size() < blockNumber) {
                  StringBuilder sb = new StringBuilder();
                  sb.append(getMetafileInfoForLog(metafile, "getBlockUuidByNumber"));
                  sb.append(", has block count: ");
                  sb.append(blockUuidList.size());
                  sb.append(", requested number is: ");
                  sb.append(blockNumber);
                  throw new BlockDoesNotExistException(sb.toString());
              }
          }
  
          return blockUuidList.get(blockNumber);
      }
focal_method.class_method_signature: BlockManipulationServiceImpl.getBlockUuidByNumber(Metafile metafile, int blockNumber)
focal_method.full_signature: @Override public String getBlockUuidByNumber(Metafile metafile, int blockNumber)
focal_method.identifier: getBlockUuidByNumber
focal_method.invocations: getBlockUuidList containsValue getProperties toString append getMetafileInfoForLog append toString size append getMetafileInfoForLog append append size append append toString get
focal_method.modifiers: @Override public
focal_method.parameters: (Metafile metafile, int blockNumber)
focal_method.return: String
focal_method.signature: String getBlockUuidByNumber(Metafile metafile, int blockNumber)