@Test
public void testImportTwiceIsANoOp() throws Exception {

    FluentIterable<ComponentCSVRecord> compCSVRecords = getCompCSVRecordsFromTestFile(fileName);
    assertThat(componentClient.getComponentSummary(user), hasSize(0));
    assertThat(componentClient.getReleaseSummary(user), hasSize(0));
    assertThat(attachmentRepository.getAll(), Matchers.hasSize(0) );
    ComponentImportUtils.writeToDatabase(compCSVRecords, componentClient, vendorClient, attachmentClient, user);
    assertThat(attachmentRepository.getAll(), Matchers.hasSize(1) );
    List<Component> componentSummaryAfterFirst = componentClient.getComponentSummary(user);
    List<Release> releaseSummaryAfterFirst = componentClient.getReleaseSummary(user);
    assertExpectedComponentsInDb();
    ComponentImportUtils.writeToDatabase(compCSVRecords, componentClient, vendorClient, attachmentClient, user);
    assertExpectedComponentsInDb();
    assertThat(attachmentRepository.getAll(), Matchers.hasSize(1) );
    assertThat(componentClient.getComponentSummary(user), is(componentSummaryAfterFirst));
    assertThat(componentClient.getReleaseSummary(user), is(releaseSummaryAfterFirst));
}