title: Asserting UUID in junit
body: <p>I have a method which builds an object and returns it. </p>
  
  <p>The object as UUID as one of its fields. While building the object, random UUID is generated. Here is the code:</p>
  
  <pre><code>public MetaData getMetaData(String id) {
    return MetaData.newBuilder().setId(id)
      .setCorrelationId(UUID.randomUUID().toString())
      .setCreatedAt(now(UTC).format(ISO_ZONED_DATE_TIME))
      .build();
  }
  </code></pre>
  
  <p>Here is my test:</p>
  
  <pre><code>@Test
  public void shouldVerifyIfTheMetaDataIsBuild() {
  
    MetaData metaData = handler.getMetaData("1234");
  
    assertThat(metaData.getId(), is("1234"));
    assertThat(metaData.getCorrelationId(), isNotNull());
  }
  </code></pre>
  
  <p>I'm just verifying if the <code>correlationId</code> is not null or not. Is there a better way to verify the <code>UUID</code>?</p>