I need to write junit tests for a method that implements the runnable and the whole logic of the code is within run() method. for example:
public class BookmarkController{
public void addBookmark(final String url, final String title) {
Runnable r = new Runnable() {
@Override
public void run() {
//some logic
};
}
}
can anybody tell me how to write tests for the method.