@Before
  public void setUp() throws Exception {
    subject = new BaselineRequestContextBuilder();

    when(preferencesMock.getSerializedFilterFactors()).thenReturn(SERIALIZED_FACTORS);
    when(preferencesMock.getQueryFactorValues())
        .thenReturn(Sets.newTreeSet(Sets.newHashSet(QUERY_FACTOR1, QUERY_FACTOR2, QUERY_FACTOR3)));
    when(preferencesMock.getQueryFactorType()).thenReturn(FACTOR_TYPE);
    when(preferencesMock.getGeneQuery()).thenReturn(SemanticQuery.create());
    when(experimentMock.getExperimentalFactors()).thenReturn(experimentalFactorsMock);
    when(experimentMock.getSpecies())
        .thenReturn(
            new Species(
                "H**o sapiens",
                SpeciesProperties.create(
                    "h**o sapiens",
                    "Homo_sapiens",
                    "ORGANISM_PART",
                    "animals",
                    ImmutableSortedMap.<String, List<String>>of())));
    when(experimentalFactorsMock.getComplementFactors(anySetOf(Factor.class)))
        .thenReturn(Sets.newTreeSet(Sets.newHashSet(new Factor(FACTOR_TYPE, FACTOR_VALUE))));
  }