A developer has added multiple related features in an implementation that needs to be tested. For efficiency, all those features need to be tested at the same time. Which two statements are true about including multiple tests? (Select two)
Answer : D, E
Testing efficiency in Guidewire is achieved by grouping related test cases so they can be executed as a logical unit, especially during Automated Builds in TeamCity. There are two primary ways to group tests in the GUnit framework.
First, a developer can place multiple test methods within the same GUnit class (Option D). In Gosu, any public function in a test class that begins with the prefix test is automatically recognized by the GUnit runner. This is the most efficient way to test related features that share the same setup (before) and teardown (after) logic, as the system can initialize the test environment (the 'Bundle' or 'Environment') once for the entire class.
Second, for broader implementations spanning multiple classes, developers use the @Suite annotation (Option E). A Test Suite is a specialized Gosu class that acts as a container for other test classes. By using the @Suite annotation and listing the relevant GUnit classes, a developer can trigger a comprehensive test run of all related features with a single execution command. This is a core part of the Guidewire Cloud Standards for ensuring code quality before a release.
Options A, B, and C are incorrect because they refer to specific assertions (assertTrue), inheritance, or directory configurations which do not govern the aggregation or simultaneous execution of multiple tests. Adhering to the class and suite grouping patterns allows for better organization of the Source Control repository and faster feedback during the development lifecycle.
The following Gosu statement is the Action part of a validation rule:

It produces the following compilation error:
Gosu compiler: Wrong number of arguments to function rejectFieldQava.lang.String, typekey.ValidationLevel, java.lang.string, typekey.ValidationLevel, java.lang.string). Expected 5, got 3
What needs to be added to or deleted from the statement to clear the error?
Answer : A
In Guidewire Validation Rules, the rejectField method is a critical tool for identifying specific fields that fail business logic checks. This method allows the application to highlight the exact UI widget in red and provide a specific error message to the user.
As indicated by the compiler error, the rejectField method on a Guidewire entity (like Contact or Claim) has a very specific signature that requires five parameters:
Field Name (String): The name of the property being validated (e.g., 'State').
Validation Level (ValidationLevel): The severity of the failure (e.g., TC_LOADSAVE).
Error Message (String): The text displayed to the user.
Error Group (ValidationLevel): An optional group for categorizing the error.
Error ID (String): An optional unique identifier for the specific error.
When the compiler reports 'Expected 5, got 3', it means the developer only provided the first three arguments. To resolve this error according to Guidewire best practices, the developer must complete the signature. While null is often passed for the final two arguments if they are not needed, the compiler requires them to be present so it can identify which version of the overloaded rejectField method is being called.
The reason Option A is the recognized answer in this context is that simply adding null, null is often insufficient if the types aren't explicitly recognized or if the code had 'placeholder' nulls that didn't match the expected typekey/string types. By ensuring the 4th argument is a ValidationLevel typekey and the 5th is a String, the developer satisfies the Gosu compiler's strict type-checking requirements. This ensures the validation logic is correctly registered within the current bundle transaction and will properly interrupt the commit process if the condition is met.
An insurer wants to add a new typecode for a loan account to a base typelist, BankAccountType, that has not been extended. Which step must a developer take to perform this task following best practices?
Answer : A
The Guidewire Data Model uses a strict separation between base application code and customer extensions. Base typelists are defined in .tti (Typelist Internal) files, which are strictly off-limits for modification by developers (ruling out Option C).
To extend a base typelist, the developer must use a Typelist Extension file, which always uses the .ttx suffix. The name of the .ttx file must match the name of the base typelist exactly (e.g., BankAccountType.ttx). Adding _Ext to the filename (Option D) is incorrect, as the system would not recognize it as an extension of the base list.
Regarding the code itself, Guidewire best practices for InsuranceSuite Developer projects recommend adding a customer-specific suffix, such as _Ext, to any new typecodes added to a base typelist. This ensures that if a future Guidewire update introduces a 'LoanAccount' code to the base product, the customer's custom code (LoanAccount_Ext) will not collide with it. Collisions can cause significant issues during upgrades, including database constraint violations and broken logic. By following the pattern in Option A, the developer ensures that the configuration is upgrade-safe, follows the SurePath methodology, and correctly integrates with the application's Open Type System.
An insurance carrier requires that a claim be flagged as potential fraud when the Loss Date on a claim is changed, and a review activity and history entry be created. Which configuration will accomplish this?
Answer : C
In the Guidewire Rules Engine, detecting changes to specific fields during a transaction is a primary use case for Pre-update Rules. A Pre-update rule executes after the user clicks 'Update' but before the data is committed to the database.
According to Gosu Rules best practices, the developer should use the isFieldChanged() method (e.g., claim.isFieldChanged(Claim#LossDate)) within a Pre-update rule. If the field has changed, the rule can then perform multiple actions within the same database bundle. In this scenario, the rule can simultaneously set the FraudIndicator flag, create a new Activity object for review, and add a History entry. Since these actions happen in the Pre-update stage, they are all bundled into a single atomic database transaction. If the save succeeds, all three updates are committed; if it fails, none are.
Option A is incorrect because Validation Rules are intended to block the save operation if data is invalid, not to perform secondary business logic like creating activities. Option B is inefficient because it splits the logic across two different rulesets, which is harder to maintain and may lead to timing issues. Option D is incorrect because Post-setup Rules are generally used for initial object defaults when a new entity is created, not for tracking changes to existing fields. By using a single Pre-update rule (Option C), the developer follows the architectural standard for 'change-triggered' logic, ensuring the system remains performant and the code remains encapsulated.
There is a requirement for an additional filter on Desktop Activities. The filter requires a complex query. Which option will meet the requirement and follow best practices?
Answer : C
In Guidewire InsuranceSuite, implementing filters on high-volume pages like Desktop Activities requires a deep understanding of performance and the Gosu Query API. When a business requirement involves a 'complex query'---typically meaning logic that spans across multiple related entities or involves conditional logic that cannot be expressed in a simple ToolbarFilterOption---the best practice is to encapsulate that logic within a separate Gosu function.
Using a function that utilizes a subselect clause is a preferred architectural pattern for complex filtering. A subselect allows the database engine to perform the filtering logic entirely at the SQL level (e.g., using an EXISTS or IN clause) without pulling large amounts of data into the application server's memory. This is significantly more efficient than retrieving a list of objects and then filtering them in Gosu (as suggested in Option A or B). In the context of PCF Configuration, the filter property of a ToolbarFilterOption or a Filter widget can call this function, which returns a Query object.
By returning a Query instead of a list of results, the UI component can further optimize the database call with paging and sorting logic. Option B, which suggests using for loops and if statements, is a direct violation of performance standards as it would result in 'N+1' query problems and excessive memory consumption on the application tier. Therefore, leveraging the power of the Query API with subselects ensures that the application remains responsive even as the volume of activities grows.
An insurance carrier needs the ability to capture information for different kinds of watercraft, such as power boats, personal water craft, sailboats, etc. The development team has created a Watercraft_Ext entity with subtype entities to store the distinct properties of each type of watercraft. Which represents the best approach to provide the ability to edit the data for watercraft in the User Interface?
Answer : D
Guidewire configuration follows the principle of Modular UI Design, especially when dealing with entity inheritance (subtypes). In this scenario, the carrier has a base Watercraft_Ext entity with multiple subtypes (e.g., PowerBoat, Sailboat). These subtypes share common attributes (like Make, Model, and Year) but have unique attributes (like MastHeight for sailboats or EngineType for powerboats).
The best practice for designing an interface for subtypes is to use Modal InputSets (Option D). This approach involves creating a 'master' Detail View (DV) that contains the common fields shared by all watercraft. Below the common fields, a ModalInputSet is added. Guidewire's PCF engine then uses a 'mode' (typically the subtype name) to determine which specific InputSet to render at runtime.
This method is superior to others for several reasons:
Maintenance: Common fields are defined in only one place. If you need to add a 'Color' field to all watercraft, you change one DV, not five separate pages (avoiding the redundancy of Option A).
Performance and Cleanliness: It avoids a massive, cluttered page with hundreds of 'visible' expressions (Option B), which is difficult to maintain and can slow down page rendering.
User Experience: It provides a seamless experience where the UI dynamically adjusts to the specific boat type without the jarring transition of moving between entirely different pages (Option C).
By using InputSet widgets with the mode property, developers can create a highly scalable and organized UI that mirrors the object-oriented structure of the underlying Data Model.
A business analyst has a requirement to use either the EmailAddress1 or EmailAddress2 field on ABContact as the primary email address, which will be used in multiple places.
{
var emailAddress = this.EmailAddress1
if(StringUtils.isEmpty(emailAddress))
emailAddress = this.EmailAddress2
return emailAddress
}
Which enhancement component signature is appropriate for this implementation and follows best practice?
Answer : B
When extending the functionality of base Guidewire entities (like ABContact), developers use Enhancements. Enhancements allow you to add methods and properties to a class without modifying the original source code. For the requirement of deriving a value from existing fields (logic often referred to as a 'calculated' or 'virtual' field), the best practice is to use a Property Get.
A property get allows the derived value to be accessed using standard dot notation (e.g., myContact.EmailAddress_Ext) just like any other field on the entity. This is particularly beneficial in PCF Configuration, as the property can be used in the value attribute of a widget, and the UI engine will treat it as a readable piece of data. Using a function (Option C or D) would require parentheses in every call, which is less 'Gosu-esque' for a simple data retrieval task.
Furthermore, naming conventions in Guidewire dictate that custom extensions should include a suffix like _Ext to prevent naming collisions with future base application updates. By choosing a property get, the developer ensures the code is clean, readable, and highly reusable across the entire InsuranceSuite. This approach encapsulates the null-checking logic within the entity's enhancement, meaning that if the business logic for choosing the email address ever changes, it only needs to be updated in one place rather than in every PCF where the email is displayed.
==========