NavigationContextImpl implements NavigationContext<T> { @Override public List<Long> getCategories() { if (categories == null) { return null; } return Collections.unmodifiableList(categories); } NavigationContextImpl(final long shopId,
                                 final long customerShopId,
                                 final String customerLanguage,
                                 final List<Long> categories,
                                 final boolean includeSubCategories,
                                 final Map<String, List<String>> navigationParameters,
                                 final T productQuery,
                                 final T productSkuQuery); @Override long getShopId(); @Override long getCustomerShopId(); @Override String getCustomerLanguage(); @Override List<Long> getCategories(); @Override boolean isIncludeSubCategories(); @Override boolean isGlobal(); @Override boolean isFilteredBy(final String attribute); @Override Set<String> getFilterParametersNames(); @Override List<String> getFilterParameterValues(final String parameterName); @Override Map<String, List<String>> getMutableCopyFilterParameters(); @Override T getProductQuery(); @Override T getProductSkuQuery(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testCategoriesCanBeNull() throws Exception { assertNull(new NavigationContextImpl(10L, 10L, "en", null, false, Collections.EMPTY_MAP, null, null).getCategories()); }