  @Test
  public void proximityShouldBeEqualToImmediateAndNear() {

    // given
    Beacon beacon = Mockito.mock(Beacon.class);

    // when
    when(beacon.getProximity()).then(new Answer<Proximity>() {
      @Override
      public Proximity answer(InvocationOnMock invocationOnMock) throws Throwable {
        return Proximity.NEAR;
      }
    });

    Function<Beacon, Boolean> filter =
        Filter.proximityIsEqualTo(Proximity.IMMEDIATE, Proximity.NEAR);
    Boolean call = apply(filter, beacon);

    // then
    assertThat(call).isTrue();
  }