package com.autonomy.abc.selenium.search;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

public class FindSearchResult extends SearchResult {
    private final WebElement similarDocuments;
    private final String reference;

    public FindSearchResult(WebElement result){
        super(result);

        title = result.findElement(By.tagName("h4"));
        icon = result.findElement(By.cssSelector(".content-type i"));

        similarDocuments = result.findElement(By.className("similar-documents-trigger"));
        reference = result.findElement(By.className("document-reference")).getText();
    }

    public String getReference() {
        return reference;
    }

    public WebElement getSimilarDocuments() {
        return similarDocuments;
    }
}

@@ -169,174 +169,141 @@
    p
-rivate final WebElement similarDocuments;%0A    private final String reference;%0A%0A    public FindSearchResult(WebElement result)%7B%0A        super(result);%0A%0A        title =
+ublic FindSearchResult(WebElement result)%7B%0A        super(result);%0A    %7D%0A%0A    @Override%0A    public WebElement title() %7B%0A        return
  res
@@ -345,18 +345,73 @@
     
+%7D%0A%0A
     
-icon =
+@Override%0A    public WebElement getIcon() %7B%0A        return
  res
@@ -466,98 +466,49 @@
 ));%0A
-%0A
     
+%7D%0A%0A
     
-similarDocuments = result.findElement(By.className(%22similar-documents-trigger%22));
+public String getReference() %7B
 %0A   
@@ -518,17 +518,12 @@
   re
-ference =
+turn
  res
@@ -596,76 +596,8 @@
  %7D%0A%0A
-    public String getReference() %7B%0A        return reference;%0A    %7D%0A%0A
     
@@ -618,12 +618,9 @@
 ent 
-getS
+s
 imil
@@ -650,32 +650,66 @@
  return 
+result.findElement(By.className(%22
 similar
-D
+-d
 ocuments
 ;%0A    %7D%0A
@@ -700,16 +700,27 @@
 ocuments
+-trigger%22))
 ;%0A    %7D%0A

Update FindSearchResult to calculate inner values only when needed