### Question:
CompositeSecret implements Secret { @Override public Optional<String> get() { for (Secret secret : secrets) { Optional<String> optionalPassword = secret.get(); if (optionalPassword.isPresent()) return optionalPassword; } return Optional.empty(); } CompositeSecret(Secret... secrets); @Override Optional<String> get();  }### Answer:
@Test public void testGetPasswordReturnNullIfNoPasswordStoresWereAdded() { assertThat(new CompositeSecret().get().isPresent(), is(false)); }
@Test public void testGetPasswordReturnNullIfPasswordNotFoundInAnyStore() { assertThat(new CompositeSecret(Optional::empty, Optional::empty).get().isPresent(), is(false)); }
@Test public void testGetPasswordReturnPasswordFromFirstStoreIfExists() { assertThat(new CompositeSecret(() -> Optional.of("Pass"), Optional::empty).get().get(), is("Pass")); }
@Test public void testGetPasswordReturnPasswordFromSecondStoreIfNotExistsInFirst() { assertThat(new CompositeSecret(Optional::empty, () -> Optional.of("Pass")).get().get(), is("Pass")); }