### Question:
CommonBeans { @Bean public HiveConf hiveConf(@Value("${properties.metastore-uri}") String metastoreUri) { HiveConf conf = new HiveConf(); conf.setVar(HiveConf.ConfVars.METASTOREURIS, metastoreUri); return conf; }  @Bean HiveConf hiveConf(@Value("${properties.metastore-uri}") String metastoreUri); @Bean CloseableMetaStoreClientFactory metaStoreClientFactory(); @Bean(name = "hiveClientFactory") CleanerClientFactory clientFactory(
      Supplier<CloseableMetaStoreClient> metaStoreClientSupplier,
      @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean DeletedMetadataReporter deletedMetadataReporter(
      MeterRegistry meterRegistry,
      @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean @Profile("default") AmazonS3 amazonS3(); @Bean S3Client s3Client(AmazonS3 amazonS3, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean(name = "expiredMetadataHandler") ExpiredMetadataHandler expiredMetadataHandler(
      @Qualifier("hiveClientFactory") CleanerClientFactory cleanerClientFactory,
      HousekeepingMetadataRepository housekeepingMetadataRepository,
      @Qualifier("hiveTableCleaner") MetadataCleaner metadataCleaner,
      @Qualifier("s3PathCleaner") PathCleaner pathCleaner);  }### Answer:
@Test public void typicalHiveConf() { HiveConf hiveConf = commonBeans.hiveConf(metastoreUri); assertThat(hiveConf.get(HiveConf.ConfVars.METASTOREURIS.varname)).isEqualTo(metastoreUri); }
@Test public void hiveConfFailure() { assertThrows(IllegalArgumentException.class, () -> { commonBeans.hiveConf(null); }); }