SessionConfig { public static Builder builder() { return new Builder(); } private  SessionConfig( Builder builder ); static Builder builder(); static SessionConfig defaultConfig(); static SessionConfig forDatabase( String database ); Iterable<Bookmark> bookmarks(); AccessMode defaultAccessMode(); Optional<String> database(); Optional<Long> fetchSize(); @Override boolean equals( Object o ); @Override int hashCode(); @Override String toString();  }
@Test void shouldNotAllowNullDatabaseName() throws Throwable { assertThrows( NullPointerException.class, () -> builder().withDatabase( null ) ); }
@Test void shouldTwoConfigBeEqual() throws Throwable { SessionConfig config1 = builder().withFetchSize( 100 ).build(); SessionConfig config2 = builder().withFetchSize( 100 ).build(); assertEquals( config1, config2 ); }