In 7.6* API we have TibMsg tibMsg = new TibMsg() so we can create a mock message and reply to mock tests. But in 8.1* there is no Tib libraries and response we get is OmmMsg. So can someone please guide on how I can create new OmmMsg since it's interface so can't create new and don't have any implementations for this interface too.
Please refer to RFA Java Developers Guide in section 6.14 Creating the Message which explains how to create OMM message in details with the sample source code.
Are you using RFA Java or C++ - I will assume RFA Java based on the TibMsg() snippet above?
You are correct that you cannot create an OMMMsg directly.
You can use acquireMsg() to acquire an OMMMsg from OMMPool and then releaseMsg() to release the OMMMsg back to the pool when finished with it.
This is described in more detail in the RFA Java Documentation - including the RFAJ_DeveloperGuide - which you can also find in the Docs folder of the RFA SDK package.
You have not explained exactly why you need to create your Mock class. I can only assume you are using it to publish dummy data in response to a request for such data by a subscriber.
If this is the case, then please refer to the RFA Java StarterProviderInteractive example which you can find in the Examples\com\reuters\rfa\example\omm\prov folder.
In there you will find the ProviderClientSession class which has a couple of methods which show how to publish dummy data responses - processItemRequest() and sendUpdates().
However, before you go too far down this route - is there any reason why you cannot use our newer Elektron Message API (EMA) Java edition to develop your new OMM based application?
I mention EMA because it is generally much simpler to learn, develop and maintain code using EMA than RFA. So, if you compare the above RFA example code with the code demonstrated in the EMA NI Provider tutorial - you will see how much simpler the code for publishing a response is in EMA Java compared to RFA.
EMA is also our strategic API - so any new features etc will only appear in EMA. RFA is feature-complete - and therefore it does not generally make sense to develop any new applications using RFA (unless you have a strong reason for doing so).
To get an appreciation of EMA, I recommend you spend some time working through the tutorials - so you can determine for yourself how much simpler EMA is to use.
EMA is free. You do not need to have any license.
To migrate from RFA MarketData interface to EMA, please refer to Why Migrate from RFA to EMA API? video. This video explains what EMA is, the benefits, the comparison of RFA and EMA, resources which help you to migrate from RFA to EMA.