package com.intershop.adapter.payment.partnerpay.internal.luckynumbers;

import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

import com.intershop.adapter.payment.partnerpay.capi.luckynumbers.LuckyNumberGenerator;

public class LuckyNumberGeneratorImpl implements LuckyNumberGenerator
{
    private static final int NUMBER = 3;
    
    @Override
    public List<Integer> getLuckyNumbers()
    {
        Random rand = new Random();
        
        return IntStream.generate(() -> rand.nextInt(100) + 1).limit(NUMBER).boxed().collect(Collectors.toList());
    }
}

@@ -153,43 +153,8 @@
 ors;
-%0Aimport java.util.stream.IntStream;
 %0A%0Aim
@@ -433,21 +433,14 @@
     
-Random rand =
+return
  new
@@ -448,17 +448,17 @@
 Random()
-;
+.
 %0A       
@@ -458,25 +458,24 @@
         
-%0A
         
 return I
@@ -470,85 +470,162 @@
     
-return IntStream.generate(() -%3E rand.nextInt(100) + 1).limit(NUMBER).boxed().
+        ints(1, 101).%0A                        distinct().%0A                        limit(NUMBER).%0A                        boxed().%0A                        
 coll

fix the random number generation to produce unique numbers