AmountRowController { public void configure(){ if(advancedConfiguration.isAmountRowEnabled()){ amountRow.showAmountRow(); } else { amountRow.hideAmountRow(); } } AmountRowController(@NonNull final AmountRowVisibilityBehaviour amountRow, @NonNull final AdvancedConfiguration advancedConfiguration); void configure();  }
@Test public void ifAmountRowIsEnabledAmountRowShouldBeShowed(){ when(advancedConfiguration.isAmountRowEnabled()).thenReturn(true); amountRowController.configure(); verify(amountRow).showAmountRow(); }
@Test public void ifAmountRowIsNotEnabledAmountRowShouldBeHidden(){ when(advancedConfiguration.isAmountRowEnabled()).thenReturn(false); amountRowController.configure(); verify(amountRow).hideAmountRow(); }