PageSpec pageSpec = pageSpecReader.read(getClass().getResource("/specs/spec-conditional-simple.spec").getFile());
List<PageSection> sections = pageSpec.getSections();
assertThat(sections.size(), is(1));
PageSection pageSection = sections.get(0);
List<ConditionalBlock> blocks = pageSection.getConditionalBlocks();
assertThat(blocks.size(), is(1));
ConditionalBlock block = blocks.get(0);
List<ConditionalBlockStatement> statements = block.getStatements();
assertThat(statements.size(), is(1));
ConditionalBlockStatement statement = statements.get(0);
assertThat(statement.isInverted(), is(false));
List<ObjectSpecs> statementObjects = statement.getObjects();
assertThat(statementObjects.size(), is(2));
assertThat(statementObjects.get(0).getObjectName(), is("button-1"));
assertThat(statementObjects.get(0).getSpecs().get(0).getOriginalText(), is("width: > 100px"));
assertThat(statementObjects.get(1).getObjectName(), is("button-2"));
assertThat(statementObjects.get(1).getSpecs().get(0).getOriginalText(), is("height: < 50px"));
assertThat(statementObjects.get(1).getSpecs().get(1).getOriginalText(), is("width: 200px"));
List<ObjectSpecs> bodyObjects = block.getBodyObjects();
assertThat(bodyObjects.size(), is(2));
assertThat(bodyObjects.get(0).getObjectName(), is("button-1"));
assertThat(bodyObjects.get(0).getSpecs().get(0).getOriginalText(), is("above: button-2 0px"));
assertThat(bodyObjects.get(1).getObjectName(), is("button-2"));
assertThat(bodyObjects.get(1).getSpecs().get(0).getOriginalText(), is("below: button-1 0px"));
List<ObjectSpecs> sectionObjects = pageSection.getObjects();
assertThat(sectionObjects.size(), is(2));
assertThat(sectionObjects.get(0).getObjectName(), is("textfield"));
assertThat(sectionObjects.get(0).getObjectName(), is("textfield"));
}