@Test
public void testPromoteAlways() {

    // test that new as well as updated objects that are put in the cache are promoted
    PersistentObjectCacheWithMRUSort<Bam> cache =
            builder.withRefresher(new NoopRefresher<Bam>())
                    .withMruSort().promoteWhenNewOrUpdated().build();
    Bam first = new Bam(1, "first");
    Bam second = new Bam(2, "second");
    CurrentTime.freezeAt(1000);
    cache.put(first);
    CurrentTime.freezeAt(2000);
    cache.put(second);
    CurrentTime.freezeAt(3000);
    cache.put(first); // this time, because of the different strategy, it should always
    // update the order, and hence have first in front again
    Assert.assertEquals(first, cache.valuesByMostRecentlyUsed().iterator().next());
}