SfcServicePathId { public static int generatePathIdRandomIncrements() { int pathid; int count = num_pathid; do { next_pathid = next_pathid + (randomGenerator.nextInt(num_pathid) % N) + 1; pathid = MIN_PATH_ID + (next_pathid % num_pathid); if (check_suitable_pathid(pathid)) { return pathid; } count--; } while (count > 0); return -1; }  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 testGeneratePathIdRandomIncrements() throws Exception { for (int i = 0; i < 20; i++) { assertTrue(pathIdSet.add(SfcServicePathId.generatePathIdRandomIncrements())); } pathIdSet.clear(); }