JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
JUnit interview questions part 14
JUnit interview questions part 14
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Command to check existence of collection is :
A. White Box
B. Unit
C. Black Box
D. Loss
Show Correct Answer
Correct Answer is :
Black Box
2. Which of the following method is used to query documents in collections ?
A. Value
B. Coverage
C. Mechanism
D. Acceptance
Show Correct Answer
Correct Answer is :
Value
3. When you query a collection, MongoDB returns a ________ object that contains the results of the query.
A. White Box
B. Unit
C. Black Box
D. Loss
Show Correct Answer
Correct Answer is :
Black Box
4. Which of the following method returns true if the cursor has documents ?
A. Access to more methods
B. Better documentation
C. Faster tests
D. More accepted tests
Show Correct Answer
Correct Answer is :
Access to more methods
5. ____________ method renders the document in a JSON-like format.
A. White Box
B. Unit
C. Black Box
D. Loss
Show Correct Answer
Correct Answer is :
White Box
6. Which of the following method is called while accessing documents using the array index notation ?
A. Static
B. Private
C. Protected
D. Void
Show Correct Answer
Correct Answer is :
Protected
7. The mongo shell and the drivers provide several cursor methods that call on the cursor returned by the _______ method to modify its behavior.
A. Hamcrest Matcher
B. Instance Function
C. JUnitMatcher
D. Matcher
Show Correct Answer
Correct Answer is :
JUnitMatcher
8. Which of the following method corresponds to Order by clause in SQL ?
A. org.junit.JUnitMatchers.hasItem
B. org.junit.hasItem
C. org.junit.Junit.hasItem
D. org.junit.hamcrest.hasItem
Show Correct Answer
Correct Answer is :
org.junit.JUnitMatchers.hasItem
9. The __________ method limits the number of documents in the result set.
A. java.lang.Object
B. java.lang.String
C. java.util.*
D. java.util.Arrays
Show Correct Answer
Correct Answer is :
java.lang.Object
10. Which of the following line skips the first 5 documents in the bios collection and returns all remaining documents ?
A. all
B. both
C. justTwo
D. matchTwo
Show Correct Answer
Correct Answer is :
both
11. ___________ is a specification for storing and retrieving files that exceed the BSON-document size limit of 16MB.
A. isNull
B. nullValue
C. isNullValue
D. isNullable
Show Correct Answer
Correct Answer is :
nullValue
12. By default GridFS limits chunk size to ______ k.
A. isProperty
B. porperty
C. hasProperty
D. isPresent
Show Correct Answer
Correct Answer is :
hasProperty
13. When you query a GridFS store for a file, the _______ will reassemble the chunks as needed.
A. Class
B. Object
C. Value
D. Property
Show Correct Answer
Correct Answer is :
Property
14. Each document in the __________ collection represents a distinct chunk of a file as represented in the GridFS store.
A. Indexed
B. valued
C.
D. variable
Show Correct Answer
Correct Answer is :
Indexed
15. GridFS uses a _________ index on the chunks collection for the files_id and n fields.
A. stringEqual
B. equalToIgnoringCase
C. ignoringCaseEqual
D. equalToCase
Show Correct Answer
Correct Answer is :
equalToIgnoringCase
16. The ___ field contains the sequence number of the chunk.
A. hasItem
B. hasItems
C. hasValue
D. hasEntry
Show Correct Answer
Correct Answer is :
hasEntry
17. The GridFS index allows efficient retrieval of __________ using the files_id and n values
A. IMocksControl
B. IExpectationSetters
C. IExpectation
D. Isetters
Show Correct Answer
Correct Answer is :
IExpectationSetters
18. To modify an existing index, you cannot just re-issue the _________ method with the updated specification of the index.
A. andStubReturn(T value)
B. andThrow(Throwable throwable)
C. anyTimes()
D. asStub()
Show Correct Answer
Correct Answer is :
anyTimes()
19. If you need to rebuild indexes for a collection you can use the _________ method to rebuild all indexes on a collection in a single operation.
A. andStubReturn(T value)
B. andThrow(Throwable throwable)
C. anyTimes()
D. asStub()
Show Correct Answer
Correct Answer is :
asStub()
20. To terminate an ongoing index build, use the __________ method in the mongo shell.
A. times(int count)
B. times(int min, int max)
C. once()
D. asStub()
Show Correct Answer
Correct Answer is :
times(int min, int max)
Similar Interview Questions
Search for latest jobs
Find Jobs