SoqlQueryAnalyzer { protected String getFromObjectName() { return getQueryData().getFromClause().getMainObjectSpec().getObjectName(); } SoqlQueryAnalyzer(String soql, Function<String, DescribeSObjectResult> objectDescriptor);  SoqlQueryAnalyzer(String soql, Function<String, DescribeSObjectResult> objectDescriptor, Map<String, DescribeSObjectResult> describedObjectsCache); List getFieldDefinitions();  }
@Test public void testGetFromObjectName() { SoqlQueryAnalyzer analyzer = new SoqlQueryAnalyzer(" select Id , Account.Name \r\nfrom Contact\r\n where something = 'nothing' ", n -> this.describeSObject(n)); String expected = "Contact"; String actual = analyzer.getFromObjectName(); assertEquals(expected, actual); }