@Test public final void executeWithNoTags() { final DomainMapper<StreamPopularHashTagsRequest, StreamPopularHashTagsReportDTO> popularHashTagsMapper = context .mock(DomainMapper.class); final StreamPopularHashTagsRequest request = new StreamPopularHashTagsRequest(); final StreamPopularHashTagsReportDTO response = new StreamPopularHashTagsReportDTO(null, null); final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class); GetStreamPopularHashTagsExecution sut = new GetStreamPopularHashTagsExecution(popularHashTagsMapper); context.checking(new Expectations() { { oneOf(actionContext).getParams(); will(returnValue(request)); oneOf(popularHashTagsMapper).execute(with(request)); will(returnValue(response)); } }); assertEquals(0, ((ArrayList<String>) sut.execute(actionContext)).size()); context.assertIsSatisfied(); }
@Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { log.debug("Entering"); StreamPopularHashTagsRequest request = (StreamPopularHashTagsRequest) inActionContext.getParams(); StreamPopularHashTagsReportDTO response = popularHashTagsMapper.execute(request); List<String> hashTags = response.getPopularHashTags(); ArrayList<String> result = new ArrayList<String>(); if (hashTags != null) { log.debug("Found " + hashTags.size() + " Popular Hashtags"); result.addAll(hashTags); } return result; }
GetStreamPopularHashTagsExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { log.debug("Entering"); StreamPopularHashTagsRequest request = (StreamPopularHashTagsRequest) inActionContext.getParams(); StreamPopularHashTagsReportDTO response = popularHashTagsMapper.execute(request); List<String> hashTags = response.getPopularHashTags(); ArrayList<String> result = new ArrayList<String>(); if (hashTags != null) { log.debug("Found " + hashTags.size() + " Popular Hashtags"); result.addAll(hashTags); } return result; } }
GetStreamPopularHashTagsExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { log.debug("Entering"); StreamPopularHashTagsRequest request = (StreamPopularHashTagsRequest) inActionContext.getParams(); StreamPopularHashTagsReportDTO response = popularHashTagsMapper.execute(request); List<String> hashTags = response.getPopularHashTags(); ArrayList<String> result = new ArrayList<String>(); if (hashTags != null) { log.debug("Found " + hashTags.size() + " Popular Hashtags"); result.addAll(hashTags); } return result; } GetStreamPopularHashTagsExecution(
            final DomainMapper<StreamPopularHashTagsRequest, StreamPopularHashTagsReportDTO> inPopularHashTagsMapper); }
GetStreamPopularHashTagsExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { log.debug("Entering"); StreamPopularHashTagsRequest request = (StreamPopularHashTagsRequest) inActionContext.getParams(); StreamPopularHashTagsReportDTO response = popularHashTagsMapper.execute(request); List<String> hashTags = response.getPopularHashTags(); ArrayList<String> result = new ArrayList<String>(); if (hashTags != null) { log.debug("Found " + hashTags.size() + " Popular Hashtags"); result.addAll(hashTags); } return result; } GetStreamPopularHashTagsExecution(
            final DomainMapper<StreamPopularHashTagsRequest, StreamPopularHashTagsReportDTO> inPopularHashTagsMapper); @Override Serializable execute(final PrincipalActionContext inActionContext); }
GetStreamPopularHashTagsExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { log.debug("Entering"); StreamPopularHashTagsRequest request = (StreamPopularHashTagsRequest) inActionContext.getParams(); StreamPopularHashTagsReportDTO response = popularHashTagsMapper.execute(request); List<String> hashTags = response.getPopularHashTags(); ArrayList<String> result = new ArrayList<String>(); if (hashTags != null) { log.debug("Found " + hashTags.size() + " Popular Hashtags"); result.addAll(hashTags); } return result; } GetStreamPopularHashTagsExecution(
            final DomainMapper<StreamPopularHashTagsRequest, StreamPopularHashTagsReportDTO> inPopularHashTagsMapper); @Override Serializable execute(final PrincipalActionContext inActionContext);  }