Feature toggle is used to easily enable and disable features for some group of users of the applications. Here Usergroup.java is used to define the user groups which are free and paid users. TieredFeatureToggle.java uses this paid user information to show custom messsage to paid users.

Here is the example.