JUnit interview questions part 15

JUnit interview questions part 15

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.

Correct Answer is : times(int count)

2. __________ views partial execution statistics collected during plan selection

Correct Answer is : andStubAnswer(IAnswer answer)

3. To force MongoDB to use a particular index for a db.collection.________ operation, specify the index with the hint() method.

Correct Answer is : andStubDelegateTo(Object delegateTo)

4. Specify the ______ operator to the hint() method to prevent MongoDB from using any index

Correct Answer is : andVoid()

5. ________ indexes expire documents after the specified number of seconds has passed since the indexed field value.

Correct Answer is : once()

6. When the TTL thread is active, you will see _______ operations in the output of db.currentOp()

Correct Answer is : andReturn(T value)

7. The background task that removes expired documents runs every ________ seconds.

Correct Answer is : Bottlenecks

8. On replica sets, the TTL background thread only deletes documents on :

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.

Correct Answer is : Logic unit test

10. Which of the following method is to verify whether MongoDB used index intersection ?

Correct Answer is : Mock objects

11. You may not specify a unique constraint on a ______ index.

Correct Answer is : Integration unit test

12. Which of the following indexes are always sparse ?

Correct Answer is : Call

13. To support ________ based sharding, MongoDB provides a hashed index type,

Correct Answer is : Functional unit test

14. ________ index type, which indexes the hash of the value of a field.

Correct Answer is : Functional unit test

15. The _________ property for an index causes MongoDB to reject duplicate values for the indexed field.

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.

Correct Answer is : Workflow

17. MongoDB can use the _________ of indexes to fulfill queries.

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.

Correct Answer is : Run a test many times with different sets of parameters

19. Index __________ does not eliminate the need for creating compound indexes.

Correct Answer is : @Runwith

20. Before version _______ capped collections did not have an _id field.

Correct Answer is : @Runwith

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon