### Question:
PaginationTemplateFactory { public PageNumberTemplate createPageNumberTemplate(Pagination pagination) { Preconditions.checkNotNull(pagination); return new PageNumberTemplate(pagination.getPageNumber()); }  PageNumberTemplate createPageNumberTemplate(Pagination pagination); PageSizeTemplate createPageSizeTemplate(Pagination pagination); PageSizeTemplate createPageSizeTemplate(Pagination pagination, int minPageSize, int maxPageSize); void setDefaultMaxPageSize(int defaultMaxPageSize); void setDefaultMinPageSize(int defaultMinPageSize);  }### Answer:
@Test public void createPageNumberTemplate() { Pagination pagination = new Pagination(20, 2); PageNumberTemplate pageNumberTemplate = paginationTemplateFactory.createPageNumberTemplate(pagination); assertEquals(new PageNumberTemplate(2), pageNumberTemplate); }
@Test(expected = NullPointerException.class) public void createPageNumberTemplate_NULL_CHECK() { paginationTemplateFactory.createPageNumberTemplate(null); }