### Question:
RequestParser { @VisibleForTesting CatalogTable parseCatalogTableName( String tableName ) throws ParserException { String[] tableElements = tableName.split( "\\." ); if ( tableElements.length != 2 ) { log.warn( "Table name \"{}\" not possible to parse.", tableName ); throw new ParserException( ParserErrorCode.TABLE_LIST_MALFORMED_TABLE, tableName ); } try { CatalogTable table = this.catalog.getTable( this.databaseName, tableElements[0], tableElements[1] ); log.debug( "Finished parsing table \"{}\".", tableName ); return table; } catch ( UnknownTableException e ) { log.error( "Unable to fetch table: {}.", tableName, e ); throw new ParserException( ParserErrorCode.TABLE_LIST_UNKNOWN_TABLE, tableName ); } catch ( GenericCatalogException e ) { log.error( "Unable to fetch table: {}.", tableName, e ); throw new ParserException( ParserErrorCode.TABLE_LIST_GENERIC, tableName ); } } RequestParser( final TransactionManager transactionManager, final Authenticator authenticator, final String databaseName, final String userName ); @VisibleForTesting  RequestParser( Catalog catalog, TransactionManager transactionManager, Authenticator authenticator, String databaseName, String userName ); CatalogUser parseBasicAuthentication( Request request ); ResourceGetRequest parseGetResourceRequest( Request request, String resourceName ); ResourcePostRequest parsePostResourceRequest( Request request, String resourceName, Gson gson ); ResourcePatchRequest parsePatchResourceRequest( Request request, String resourceName, Gson gson ); ResourceDeleteRequest parseDeleteResourceRequest( Request request, String resourceName ); Map<String, CatalogColumn> generateNameMapping( List<CatalogTable> tables );  }### Answer:
@Test public void testParseCatalogTableName() throws GenericCatalogException, UnknownTableException { Catalog mockedCatalog = mock(Catalog.class); when(mockedCatalog.getTable( "testdb", "schema1", "table1" )).thenReturn( null ); RequestParser requestParser = new RequestParser( mockedCatalog, null, null, "testdb", "username" ); CatalogTable table = requestParser.parseCatalogTableName( "schema1.table1." ); verify(mockedCatalog).getTable( "testdb", "schema1", "table1" ); }