FrameRotationQueue { public boolean pollRotationMatrix(float[] matrix, long timestampUs) { float[] rotation = rotations.pollFloor(timestampUs); if (rotation == null) { return false; } getRotationMatrixFromAngleAxis(rotationMatrix, rotation); if (!recenterMatrixComputed) { computeRecenterMatrix(recenterMatrix, rotationMatrix); recenterMatrixComputed = true; } Matrix.multiplyMM(matrix, 0, recenterMatrix, 0, rotationMatrix, 0); return true; } FrameRotationQueue(); void setRotation(long timestampUs, float[] angleAxis); void reset(); boolean pollRotationMatrix(float[] matrix, long timestampUs); static void computeRecenterMatrix(float[] recenterMatrix, float[] rotationMatrix);  }
@Test public void testGetRotationMatrixReturnsNull_whenEmpty() throws Exception { assertThat(frameRotationQueue.pollRotationMatrix(rotationMatrix, 0)).isFalse(); }