BareMetalRemovalUpdater { public boolean hasReferenceToBareMetal(final String value) { return value.toLowerCase().contains(BARE_METAL); }  void updateConfigurationValuesThatReferenceBareMetal(final Connection conn); List<Map<String, String>> createUpdatedConfigurationItemValues(final Connection conn); void updateConfigurationItems(final Connection conn, final List<Map<String, String>> updatedRows); void updateConfigurationItem(final Connection conn, final String category, final String instance, final String component, final String name, final String value); void findAndUpdateRowsThatReferenceBareMetal(final ResultSet values, final List<Map<String, String>> updatedRows); String createUpdatedValue(final String value); boolean hasReferenceToBareMetal(final String value); static final String VALUE; static final String CATEGORY; static final String INSTANCE; static final String COMPONENT; static final String NAME; static final String SELECT_CONFIGURATION_ITEMS; static final String UPDATE_CONFIGURATION_ITEM; }
@Test public void test_hasReferenceToBareMetal_isFalse() throws Exception { assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal(""), is(false)); assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("something"), is(false)); assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("baremeta"), is(false)); assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("aremetal"), is(false)); assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("baretal"), is(false)); }
@Test public void test_hasReferenceToBareMetal_isTrue() throws Exception { assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("baremetal"), is(true)); assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("BAREMETAL"), is(true)); assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("BaReMeTaL"), is(true)); assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("somethingbaremetal"), is(true)); assertThat(bareMetalRemovalUpdater.hasReferenceToBareMetal("somethingbaremetalsomethingelse"), is(true)); }