public virtual void TestPbRecordFactory() { RecordFactory pbRecordFactory = RecordFactoryPBImpl.Get(); try { CounterGroup response = pbRecordFactory.NewRecordInstance <CounterGroup>(); NUnit.Framework.Assert.AreEqual(typeof(CounterGroupPBImpl), response.GetType()); } catch (YarnRuntimeException e) { Sharpen.Runtime.PrintStackTrace(e); NUnit.Framework.Assert.Fail("Failed to crete record"); } try { GetCountersRequest response = pbRecordFactory.NewRecordInstance <GetCountersRequest >(); NUnit.Framework.Assert.AreEqual(typeof(GetCountersRequestPBImpl), response.GetType ()); } catch (YarnRuntimeException e) { Sharpen.Runtime.PrintStackTrace(e); NUnit.Framework.Assert.Fail("Failed to crete record"); } }