test_class.declarator: venRequestCountService
test_class.modifier: @Resource
      private
test_class.original_string: @Resource
      private VenRequestCountService venRequestCountService;
test_class.type: VenRequestCountService
test_class.var_name: venRequestCountService
test_class.file: OpenADRServerVTNCommon/src/test/java/com/avob/openadr/server/common/vtn/service/VenRequestCountServiceTest.java
test_class.identifier: VenRequestCountServiceTest
test_case.body: @Test
      public void getAndIncreaseTest() {
          String venId = "ven1";
          Long andIncrease = venRequestCountService.getAndIncrease(venId);
          assertEquals(new Long(0), andIncrease);
          andIncrease = venRequestCountService.getAndIncrease(venId);
          assertEquals(new Long(1), andIncrease);
          andIncrease = venRequestCountService.getAndIncrease(venId);
          assertEquals(new Long(2), andIncrease);
  
      }
test_case.class_method_signature: VenRequestCountServiceTest.getAndIncreaseTest()
test_case.full_signature: @Test public void getAndIncreaseTest()
test_case.identifier: getAndIncreaseTest
test_case.invocations: getAndIncrease assertEquals getAndIncrease assertEquals getAndIncrease assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getAndIncreaseTest()
focal_class.declarator: dao
focal_class.modifier: @Resource
      private
focal_class.original_string: @Resource
      private VenRequestCountDao dao;
focal_class.type: VenRequestCountDao
focal_class.var_name: dao
focal_class.file: OpenADRServerVTNCommon/src/main/java/com/avob/openadr/server/common/vtn/service/VenRequestCountService.java
focal_class.identifier: VenRequestCountService
focal_class.class_method_signature: VenRequestCountService.getAndIncrease(String venId)
focal_class.full_signature: @Transactional public Long getAndIncrease(String venId)
focal_class.identifier: getAndIncrease
focal_class.modifiers: @Transactional public
focal_class.parameters: (String venId)
focal_class.return: Long
focal_class.signature: Long getAndIncrease(String venId)
focal_method.body: @Transactional
      public Long getAndIncrease(String venId) {
          VenRequestCount findOneAndLock = dao.findOneAndLock(venId);
          long count = 0L;
          if (findOneAndLock == null) {
              findOneAndLock = new VenRequestCount(venId);
          } else {
              count = findOneAndLock.getRequestCount();
          }
          findOneAndLock.setRequestCount(count + 1);
          dao.save(findOneAndLock);
          return count;
      }
focal_method.class_method_signature: VenRequestCountService.getAndIncrease(String venId)
focal_method.full_signature: @Transactional public Long getAndIncrease(String venId)
focal_method.identifier: getAndIncrease
focal_method.invocations: findOneAndLock getRequestCount setRequestCount save
focal_method.modifiers: @Transactional public
focal_method.parameters: (String venId)
focal_method.return: Long
focal_method.signature: Long getAndIncrease(String venId)