This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class GetBookQuery(val page: Int = 1, val limit: Int = 10): Query<BookDto?> | |
class GetBookQueryHandler: QueryHandler<BookDto?, GetBookQuery> { | |
override fun handle(query: GetBookQuery): BookDto { | |
return BookDto("Dune") | |
} | |
override fun listenTo(): String = GetBookQuery::class.toString() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.avro.Schema; | |
import org.apache.avro.generic.GenericData; | |
import org.apache.avro.generic.GenericRecord; | |
import org.apache.avro.reflect.ReflectData; | |
import java.util.Arrays; | |
public class GenericRecordFixtureFactory { | |
public static GenericRecord createFromEvent(String siteId, String visitorId, String timestampMs) { | |
EventMock eventMock = new EventMock(); |