@Test
public void testInsertServiceHost() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Mockito.when(mockResultSet.getInt(1))
        .thenReturn(5) // domain id
        .thenReturn(7) // service id
        .thenReturn(9); // host id
    Mockito.when(mockResultSet.next())
        .thenReturn(true) // this one is for domain id
        .thenReturn(true) // this one is for service id
        .thenReturn(true); // this on is for host id
        
    Mockito.doReturn(1).when(mockPrepStmt).executeUpdate();
    boolean requestSuccess = jdbcConn.insertServiceHost("my-domain", "service1", "host1");
    
    // this is combined for all operations above
    
    Mockito.verify(mockPrepStmt, times(1)).setString(1, "my-domain");
    
    Mockito.verify(mockPrepStmt, times(1)).setInt(1, 5);
    Mockito.verify(mockPrepStmt, times(1)).setString(2, "service1");
    
    Mockito.verify(mockPrepStmt, times(1)).setString(1, "host1");
    
    Mockito.verify(mockPrepStmt, times(1)).setInt(1, 7);
    Mockito.verify(mockPrepStmt, times(1)).setInt(2, 9);
    
    assertTrue(requestSuccess);
    jdbcConn.close();
}