### Question:
CustomerData { public boolean isTrialPeriodExpired(Instant now) { return trialPeriodEndsAt != null && trialPeriodEndsAt.isBefore(now); }  boolean isTrialPeriodExpired(Instant now); String getDisplayName(); static CustomerData sample();  }### Answer:
@Test public void should_not_be_expired_when_no_trial_period() { assertThat(customerData.isTrialPeriodExpired(now), is(false)); }
@Test public void should_be_expired_when_after_trialPeriodEndsAt() { CustomerData cd = customerData.toBuilder().trialPeriodEndsAt(now.minusSeconds(1)).build(); assertThat(cd.isTrialPeriodExpired(now), is(true)); }
@Test public void should_not_be_expired_when_before_trialPeriodEndsAt() { CustomerData cd = customerData.toBuilder().trialPeriodEndsAt(now.plusSeconds(1)).build(); assertThat(cd.isTrialPeriodExpired(now), is(false)); }