If you work for any given amount of time as a software developer, one problem you’ll end up with is parsing structured text to extract meaningful information.
EDIT: With Mockito 2 you no longer need to use the following method. Lambdas are supported out of the box. You can use
argThat(str -> str.length >5).
Java 8 is pretty cool. We (finally!) got Lambda Expressions in Java and a lot of other goodies. At Coveo, we started working with Java 8 as soon as the first stable release was available. As mentioned in my previous blog post, one way we’re using Java 8 is in our unit tests.
Recently, I’ve spent some time adding support for server-side scripts in Coveo’s Search API component. In a Coveo setup, the Search API provides the backend through which our JS UI framework executes queries on the index, using REST requests. Queries go through what we call the Query Pipeline. The Query Pipeline provides various ways to alter the query before it’s finally sent to the index server, and now offers scriptable extension points where you can implement complex custom logic when needed.