@Test
public void testStoreUnusedValueWhenExistingUnused() throws BinaryStoreException, IOException {

    String valueToStore = "value-to-store";
    expect(s3Client.doesObjectExist(eq(BUCKET), isA(String.class))).andReturn(true);
    Capture<GetObjectTaggingRequest> getTaggingRequestCapture = Capture.newInstance();
    GetObjectTaggingResult getTaggingResult = new GetObjectTaggingResult(new ArrayList<>());
    getTaggingResult.getTagSet().add(new Tag(S3BinaryStore.UNUSED_TAG_KEY, String.valueOf(true)));
    expect(s3Client.getObjectTagging(capture(getTaggingRequestCapture)))
            .andReturn(getTaggingResult);
    replayAll();
    s3BinaryStore.storeValue(new StringInputStream(valueToStore), true);
}