@Test
public void test_findAndUpdateRowsThatReferenceBareMetal_whenThereIsOneRowThatReferencesBareMetal() throws Exception {

    when(values.next())
            .thenReturn(true)
            .thenReturn(true)
            .thenReturn(false);
    when(values.getString(BareMetalRemovalUpdater.VALUE))
            .thenReturn("someValue")
            .thenReturn("hypervisor_a,baremetal");
    when(values.getString(BareMetalRemovalUpdater.CATEGORY))
            .thenReturn("someCategory");
    when(values.getString(BareMetalRemovalUpdater.INSTANCE))
            .thenReturn("someInstance");
    when(values.getString(BareMetalRemovalUpdater.COMPONENT))
            .thenReturn("someComponent");
    when(values.getString(BareMetalRemovalUpdater.NAME))
            .thenReturn("someName");
    final List<Map<String, String>> updatedRows = new ArrayList<>();
    bareMetalRemovalUpdater.findAndUpdateRowsThatReferenceBareMetal(values, updatedRows);
    assertThat(updatedRows, hasSize(1));
    assertThat(updatedRows, contains(
            allOf(
                    hasEntry(BareMetalRemovalUpdater.VALUE, "hypervisor_a"),
                    hasEntry(BareMetalRemovalUpdater.CATEGORY, "someCategory"),
                    hasEntry(BareMetalRemovalUpdater.INSTANCE, "someInstance"),
                    hasEntry(BareMetalRemovalUpdater.COMPONENT, "someComponent"),
                    hasEntry(BareMetalRemovalUpdater.NAME, "someName")
            )
    ));
}