### Question:
JCoEnvironment { public static void registerDestination(final String destinationName, final Properties jcoProperties) { LOG.info("Registering destination " + destinationName); if (!destinationDataProvider.hasDestinations()) { registerDestinationDataProvider(); } destinationDataProvider.addDestination(destinationName, jcoProperties); } private  JCoEnvironment(); static void registerDestination(final String destinationName, final Properties jcoProperties); static void unregisterDestination(final String destinationName); static JCoDestination getDestination(final String destinationName);  }### Answer:
@Test public void destinationProviderIsRegisteredWithJCoWhenFirstDestinationGetsRegistered() { JCoEnvironment.registerDestination(DESTINATION_1, JCO_PROPERTIES_DUMMY); assertThat(Environment.isDestinationDataProviderRegistered()).isTrue(); }
@Test public void destinationIsAddedToJCoWhenDestinationGetsRegistered() { JCoEnvironment.registerDestination(DESTINATION_1, JCO_PROPERTIES_DUMMY); assertThat(DESTINATION_1).is(registeredWithJCo); }
@Test public void canRegisterTwoDestinations() { JCoEnvironment.registerDestination(DESTINATION_1, JCO_PROPERTIES_DUMMY); JCoEnvironment.registerDestination(DESTINATION_2, JCO_PROPERTIES_DUMMY); assertThat(DESTINATION_1).is(registeredWithJCo); assertThat(DESTINATION_2).is(registeredWithJCo); }