JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
JUnit interview questions part 15
JUnit interview questions part 15
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. In the mongo shell, you can use the ______ method to return a list of the indexes on a collection.
A. times(int count)
B. times(int min, int max)
C. once()
D. asStub()
Show Correct Answer
Correct Answer is :
times(int count)
2. __________ views partial execution statistics collected during plan selection
A. andAnswer(IAnswer extends T>answer)
B. andDelegateTo(Object delegateTo)
C. andStubAnswer(IAnswer extends T> answer)
D. andThrow(Throwable throwable)
Show Correct Answer
Correct Answer is :
andStubAnswer(IAnswer extends T> answer)
3. To force MongoDB to use a particular index for a db.collection.________ operation, specify the index with the hint() method.
A. andAnswer(IAnswer extends T> answer)
B. andDelegateTo(Object delegateTo)
C. andStubAnswer(IAnswer extends T> answer)
D. andStubDelegateTo(Object delegateTo)
Show Correct Answer
Correct Answer is :
andStubDelegateTo(Object delegateTo)
4. Specify the ______ operator to the hint() method to prevent MongoDB from using any index
A. andVoid()
B. times(int min, int max)
C. once()
D. asStub()
Show Correct Answer
Correct Answer is :
andVoid()
5. ________ indexes expire documents after the specified number of seconds has passed since the indexed field value.
A. andVoid()
B. times(int min, int max)
C. once()
D. asStub()
Show Correct Answer
Correct Answer is :
once()
6. When the TTL thread is active, you will see _______ operations in the output of db.currentOp()
A. andReturn(T value)
B. times(int min, int max)
C. once()
D. asStub()
Show Correct Answer
Correct Answer is :
andReturn(T value)
7. The background task that removes expired documents runs every ________ seconds.
A. Bottlenecks
B. Redundancies
C. Nodes
D. States
Show Correct Answer
Correct Answer is :
Bottlenecks
8. On replica sets, the TTL background thread only deletes documents on :
A. Unit
B. Integration
C. Loss
D. Acceptance
Show Correct Answer
Correct Answer is :
Acceptance
9. You can combine the ________ constraint with the sparse index to filter these null values from the unique index and avoid the error.
A. Logic unit test
B. Integration unit test
C. Functional unit test
D. Acceptance unit test
Show Correct Answer
Correct Answer is :
Logic unit test
10. Which of the following method is to verify whether MongoDB used index intersection ?
A. Objects
B. Mock objects
C. Controllers
D. Modules
Show Correct Answer
Correct Answer is :
Mock objects
11. You may not specify a unique constraint on a ______ index.
A. Logic unit test
B. Integration unit test
C. Functional unit test
D. Acceptance unit test
Show Correct Answer
Correct Answer is :
Integration unit test
12. Which of the following indexes are always sparse ?
A. Ignore
B. Delete
C. Call
D. Define
Show Correct Answer
Correct Answer is :
Call
13. To support ________ based sharding, MongoDB provides a hashed index type,
A. Logic unit test
B. Integration unit test
C. Functional unit test
D. Acceptance unit test
Show Correct Answer
Correct Answer is :
Functional unit test
14. ________ index type, which indexes the hash of the value of a field.
A. Logic unit test
B. Integration unit test
C. Functional unit test
D. Acceptance unit test
Show Correct Answer
Correct Answer is :
Functional unit test
15. The _________ property for an index causes MongoDB to reject duplicate values for the indexed field.
A. Logic unit test
B. Integration unit test
C. Functional unit test
D. Acceptance unit test
Show Correct Answer
Correct Answer is :
Functional unit test
16. The ______ property of an index ensures that the index only contain entries for documents that have the indexed field.
A. Workflow
B. Object
C. Class
D. Functions
Show Correct Answer
Correct Answer is :
Workflow
17. MongoDB can use the _________ of indexes to fulfill queries.
A. Run a test many times with different sets of parameters
B. Run a test with no parameters
C. Run a test with only String parameters
D. Run a test once with fixed set of parameters
Show Correct Answer
Correct Answer is :
Run a test many times with different sets of parameters
18. An index prefix is a subset of a ______ index, consisting of one or more keys starting from the beginning of the index.
A. Run a test many times with different sets of parameters
B. Run a test with no parameters
C. Run a test with only String parameters
D. Run a test once with fixed set of parameters
Show Correct Answer
Correct Answer is :
Run a test many times with different sets of parameters
19. Index __________ does not eliminate the need for creating compound indexes.
A. @Test
B. @ParameterisedClass
C. @Runwith
D. @Class
Show Correct Answer
Correct Answer is :
@Runwith
20. Before version _______ capped collections did not have an _id field.
A. @Test
B. @ParameterisedClass
C. @Runwith
D. @Class
Show Correct Answer
Correct Answer is :
@Runwith
Similar Interview Questions
Search for latest jobs
Find Jobs