### Question:
CoreContext extends AbstractContext { public Optional<String> alternateAddress() { return alternateAddress; } CoreContext(final Core core, final long id, final CoreEnvironment env, final Authenticator authenticator); long id(); CoreEnvironment environment(); Optional<String> alternateAddress(); Authenticator authenticator(); @Stability.Internal CoreContext alternateAddress(final Optional<String> alternateAddress); Core core(); @Override void injectExportableParams(final Map<String, Object> input);  }### Answer:
@Test void doesNotAllowNullAlternateIdentifier() { CoreContext ctx = new CoreContext(mock(Core.class), 1, mock(CoreEnvironment.class), mock(Authenticator.class)); assertEquals(Optional.empty(), ctx.alternateAddress()); assertThrows(InvalidArgumentException.class, () -> ctx.alternateAddress(null)); }