title: How can I get random data generated for scala case classes with the ability to "change some values" for unit testing?
body: <p>I'm working with a piece of code that has a broad/deep case class hierarchy. For unit testing, I'd like to have "random data" populated in the classes with the ability to change the data for the fields I care about?</p>
  
  <p>Example:</p>
  
  <pre><code>case class Foo(bar: Bar, name: String, value: Int)
  case class Bar(baz: Baz, price: Double)
  case class Baz(thing: String)
  </code></pre>
  
  <p>So something like:</p>
  
  <pre><code>val randomFoo = GenerateRandomData(Foo)
  randomFoo.bar.baz = Baz("custom for testing")
  </code></pre>
  
  <p>I've heard of <code>ScalaCheck</code> and <code>Shapeless</code> and <code>Scalacheck-shapeless</code> and they do provide some sort of random data generation but nothing with customization it seems.</p>
  
  <p>I'm currently using <code>ScalaMock</code> but that builds out <code>null</code> fields and breaks testability for "other" tests. I used something similar in .Net like Auto Fixture and was wondering if there was something similar in Scala.</p>