How to use tools:overrideLibrary with multiple libraries

I would like to create an Android project that is compatible to e.g. API level 4 but would still like to test it with UiAutomator that requires API level 18 on newer devices. So the app would also ...