### Question:
TokenBlobStrategy { public byte[] reverse(byte[] data) throws TokenStrategyFailedException { return apply(reverseStrategies, false, data); } @Inject  TokenBlobStrategy(TokenStrategyFactory factory, CoreTokenConfig config); byte[] perform(byte[] data); byte[] reverse(byte[] data);  }### Answer:
@Test public void shouldReverseAllStrategy() throws TokenStrategyFailedException { BlobStrategy first = mock(BlobStrategy.class); BlobStrategy second = mock(BlobStrategy.class); BlobStrategy third = mock(BlobStrategy.class); given(factory.getStrategies(any(CoreTokenConfig.class))) .willReturn(Arrays.asList(first, second, third)); byte[] data = new byte[0]; TokenBlobStrategy strategy = new TokenBlobStrategy(factory, config); strategy.reverse(data); verify(first).reverse(nullable(byte[].class)); verify(second).reverse(nullable(byte[].class)); verify(third).reverse(nullable(byte[].class)); }
@Test public void shouldReverseAllStrategy() throws TokenStrategyFailedException { BlobStrategy first = mock(BlobStrategy.class); BlobStrategy second = mock(BlobStrategy.class); BlobStrategy third = mock(BlobStrategy.class); given(factory.getStrategies(any(CoreTokenConfig.class))) .willReturn(Arrays.asList(first, second, third)); byte[] data = new byte[0]; TokenBlobStrategy strategy = new TokenBlobStrategy(factory, config); strategy.reverse(data); verify(first).reverse(any(byte[].class)); verify(second).reverse(any(byte[].class)); verify(third).reverse(any(byte[].class)); }