@Override
public Object lookup(ArquillianResource resource, Annotation... qualifiers) {
Recorder recorder = this.recorder.get();
VideoConfiguration configuration = this.configuration.get();
if (configuration.getStartBeforeClass() || configuration.getStartBeforeSuite()
|| configuration.getStartBeforeTest() || configuration.getTakeOnlyOnFail()) {
throw new IllegalStateException("It is not possible to inject video recorder into test "
+ "when you have specified that you want to take videos automatically via configuration "
+ "where you set one of start* properties to true or takeOnlyOnFail to true. In order "
+ "to use recorder manually in test class, you have to set all mentioned above to false.");
}