### Question:
OpenSessionOptionBuilder { public OpenSessionOptionBuilder setCameraByIndex(final Integer cameraByIndex) { this.cameraByIndex = cameraByIndex; this.cameraBySerialNumber = null; return this; }  OpenSessionOptionBuilder setOpenSessionOnly(final boolean openSessionOnly); OpenSessionOptionBuilder setCameraRef(final EdsCameraRef cameraRef); OpenSessionOptionBuilder setCamera(final CanonCamera camera); OpenSessionOptionBuilder setCameraByIndex(final Integer cameraByIndex); OpenSessionOptionBuilder setCameraBySerialNumber(final String cameraBySerialNumber); OpenSessionOptionBuilder setRegisterObjectEvent(final boolean registerObjectEvent); OpenSessionOptionBuilder setRegisterPropertyEvent(final boolean registerPropertyEvent); OpenSessionOptionBuilder setRegisterStateEvent(final boolean registerStateEvent); OpenSessionOption build();  }### Answer:
@Test void setCameraByIndex() { final OpenSessionOption option = builder .setCameraBySerialNumber("adawda") .setCameraByIndex(5) .build(); Assertions.assertFalse(option.getCameraBySerialNumber().isPresent()); Assertions.assertTrue(option.getCameraByIndex().isPresent()); }