@Test
public void queryComponentsWithCompoundAssetRestriction() {
addTwoTestComponentsWithTwoAssetsEach();
// SELECT FROM testcomponent WHERE (assets contains ( downloadCount = 1 ) OR assets contains ( contentType = 'text/plain' ))
MetadataQueryRestriction restriction = or(
assetPropertyEquals(P_DOWNLOAD_COUNT, 1),
assetPropertyEquals(P_CONTENT_TYPE, "text/plain"));
// count should be 2
assertThat(componentStore.countComponents(TestComponent.class, restriction), is(2L));