JiraProjectReader implements ProjectReader { String getInitialJqlQueryString() { JqlQueryStringBuilder orQueryBuilder = new JqlQueryStringBuilder(); JqlQueryStringBuilder andQueryBuilder = new JqlQueryStringBuilder(); orQueryBuilder .newQuery("status", JqlComparator.EQUAL, "eskaliert") .or("status", JqlComparator.EQUAL, "open"); return andQueryBuilder .newQuery("issuetype", JqlComparator.EQUAL, "Staffinganfrage") .and("project", JqlComparator.EQUAL, "Staffing") .and(orQueryBuilder.build()) .build(); } JiraProjectReader(RestTemplateBuilder builder, JiraConfigurationProperties properties); @Override List<Project> getAllProjectsSince(LocalDateTime dateTime); @Override List<Project> getInitialProjects(); @Override Health health();  }
@Test public void getInitialJqlQueryReturnsExpectedQuery() { var expectedQueryString = " issuetype = \"Staffinganfrage\" AND project = \"Staffing\" AND ( status = \"eskaliert\" OR status = \"open\" )"; var actualQueryString = jiraProjectReader.getInitialJqlQueryString(); assertThat(actualQueryString).isEqualTo(expectedQueryString); }