private final ID safeKeyFor(T entity) {
		ID k = keyFor(entity);
		Assert.notNull(k);
		return k;
	}
Base implementation for an in-memory store, using a {@link Map} internally.

Default behaviour is to retain sort order on the keys. Hence, this is by default the only sort supported when
querying with a {@link Pageable}.

@param <T> the type of things to store
@param <ID> a "primary key" to the things
@author Eric Bottard
spring-xd-analytics/src/main/java/org/springframework/xd/store/AbstractInMemoryRepository.java