Coder Social home page Coder Social logo

interview1's Introduction

Exercise

General info

  • As a user, I want to receive collection of specific records defined below.

Policy model can have two types of records: 1 - policy, 2 - quote. We can have quotes without policy but we can not have policies without quotes. It means that each Policy has at least one quote. End-user expect report where they will be able to see: how many quotes we have for each policy.

  • Candidate have to return list of ReportDTO records on REST facade /report using any Java structure or his own.
  • Candidate can't touch Repository interfaces.
  • Candidate need to write logic in @Service and @Controller classes.

* Service part

You need to implement loadReport method. This method can use any Java or your own structure. The only method what you can use from PolicyRepository is Stream<Policy> loadAllPolicyRecords(). This method will return Stream with all policy records from DB.

* Controller part

You need to fix getReport() method.

* Testing

You have to implement test which will test /report end-point (end-point exist, receive expected media-type, response can be mapped to ReportDTO class)

Tech spec.

  • H2 DB console: http://localhost:8080/h2-console
  • H2 DB User: sa
  • H2 DB Pass:123456qaz
  • H2 DB address: jdbc:h2:mem:interview
  • You don't need to change any application.properties parameters

** Exercise required time is up to 40 minutes.

interview1's People

Contributors

arudzitis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.