### Question:
ConnectedAccount { public static ConnectedAccount of(boolean authenticationRequired, Account account) { Entity.isEntityDefined(account, "Account must be defined"); return new ConnectedAccount(authenticationRequired, account); }  static ConnectedAccount none(boolean authenticationRequired); static ConnectedAccount of(boolean authenticationRequired, Account account); boolean isLogged(); ConnectedAccount add(Action action);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void of_null() { ConnectedAccount.of(false, null); }
@Test public void of() { Account test = Account.of("test", "Test", "test@test.com", SecurityRole.USER, AuthenticationSource.none()).withId(ID.of(2)); assertSame(ConnectedAccount.of(false, test).getAccount(), test); }