Create Unit testing for anonymous class or interface