SfcServicePathId { public static boolean check_suitable_pathid(long pathid) { ServicePathIdKey servicePathIdKey = new ServicePathIdKey(pathid/Long.SIZE); long bitEntry = pathid % Long.SIZE; InstanceIdentifier<ServicePathId> spIID; spIID = InstanceIdentifier.builder(ServicePathIds.class) .child(ServicePathId.class, servicePathIdKey) .build(); ServicePathId servicePathId = SfcDataStoreAPI. readTransactionAPI(spIID, LogicalDatastoreType.OPERATIONAL); return ((servicePathId == null) || (((1L << (64 - bitEntry)) & servicePathId.getPathIdBitarray()) == 0)); }  static int generatePathIdRandomIncrements(); static int generatePathIdSequentialIncrements(); static long check_and_allocate_pathid(long pathid); static long check_and_allocate_symmetric_pathid(long pathid); static long check_and_allocate_pathid(); static boolean check_suitable_pathid(long pathid); static boolean allocate_pathid(long pathid); static boolean free_pathid(long pathid); static GenerationAlgorithmEnum getGenerationAlgorithm(); static boolean setGenerationAlgorithm(int genAlgorithm); static boolean setGenerationAlgorithm(GenerationAlgorithmEnum genAlgorithm);  }
@Test public void testCheck_suitable_pathId() throws Exception { for (Integer pathId : pathIdList) { assertTrue(SfcServicePathId.check_suitable_pathid(pathId)); } for (Integer pathId : pathIdList) { assertTrue(SfcServicePathId.allocate_pathid(pathId)); } for (Integer pathId : pathIdList) { assertFalse(SfcServicePathId.check_suitable_pathid(pathId)); } for (Integer pathId : pathIdList) { assertTrue(SfcServicePathId.free_pathid(pathId)); } for (Integer pathId : pathIdList) { assertTrue(SfcServicePathId.check_suitable_pathid(pathId)); } }