DbmsHandlerComponentImpl implements DbmsHandlerComponent { @Override public void install(DbmsType dbmsType) { requireNonNull(dbmsType); dbmsTypes.put(dbmsType.getName(), dbmsType); } DbmsHandlerComponentImpl(); @Override void install(DbmsType dbmsType); @Override Stream<DbmsType> supportedDbmsTypes(); @Override Optional<DbmsType> findByName(String dbmsTypeName);  }
@Test void install() { assertThrows(NullPointerException.class, () -> instance.install(null)); DbmsType dbmsType = new MockDbmsType(); instance.install(dbmsType); assertEquals(1, instance.supportedDbmsTypes().count()); assertTrue(instance.findByName(dbmsType.getName()).isPresent()); }