@Test public void setIsCrossProjectDuplicationEnabled_throws_ISE_when_called_twice() { AnalysisMetadataHolderImpl underTest = new AnalysisMetadataHolderImpl(); underTest.setCrossProjectDuplicationEnabled(true); expectedException.expect(IllegalStateException.class); expectedException.expectMessage("Cross project duplication flag has already been set"); underTest.setCrossProjectDuplicationEnabled(false); }
@Test public void isCrossProjectDuplicationEnabled_return_false() { AnalysisMetadataHolderImpl underTest = new AnalysisMetadataHolderImpl(); underTest.setCrossProjectDuplicationEnabled(false); assertThat(underTest.isCrossProjectDuplicationEnabled()).isEqualTo(false); }