Here is the scenario: I generate Random Data in one class and use it as an argument in a method in the same class. How can i use the exact same value in another class ?
Here is a simplified version of my classes:
public class A {
@Test
public void aMethod() {
RandomStringUUID ruuid = new RandomStringUUID();
}
}
Then:
public class B {
@Test
public void bMethod() {
// Want to use ruuid , without instantiating RandomStringUUID
// as i dont want new values, i want the one from class A
}
}