@Test public void shouldRecordAcceptance() { // Given License license = new License("...", "..."); // When license.accept(); // Then assertTrue(license.isAccepted()); }
@Test public void shouldRecordRejection() { // Given License license = new License("...", "..."); license.accept(); // When try { license.reject(); } catch (LicenseRejectedException ignored) { } // Then: last action should win assertFalse(license.isAccepted()); }