FlashButtonHelper { public static FlashButtonPosition getFlashButtonPosition(final boolean documentImportEnabled, final boolean multiPageEnabled) { if (documentImportEnabled && !multiPageEnabled) { return FlashButtonPosition.BOTTOM_RIGHT; } else if (!documentImportEnabled) { return FlashButtonPosition.BOTTOM_LEFT; } return FlashButtonPosition.LEFT_OF_CAMERA_TRIGGER; } private  FlashButtonHelper(); static FlashButtonPosition getFlashButtonPosition(final boolean documentImportEnabled,
            final boolean multiPageEnabled);  }
@Test public void should_returnPositionLeftOfCameraTrigger_whenDocumentImport_andFileImport_areEnabled() { final FlashButtonPosition position = getFlashButtonPosition(true, true); assertThat(position).isEqualTo(FlashButtonPosition.LEFT_OF_CAMERA_TRIGGER); }
@Test public void should_returnPositionBottomLeft_whenDocumentImport_isDisabled_andFileImport_isEnabled() { final FlashButtonPosition position = getFlashButtonPosition(false, true); assertThat(position).isEqualTo(FlashButtonPosition.BOTTOM_LEFT); }
@Test public void should_returnPositionBottomRight_whenDocumentImport_isEnabled_andFileImport_isDisabled() { final FlashButtonPosition position = getFlashButtonPosition(true, false); assertThat(position).isEqualTo(FlashButtonPosition.BOTTOM_RIGHT); }
@Test public void should_returnPositionBottomLeft_whenDocumentImport_andFileImport_areDisabled() { final FlashButtonPosition position = getFlashButtonPosition(false, false); assertThat(position).isEqualTo(FlashButtonPosition.BOTTOM_LEFT); }